Less redundant error message
This commit is contained in:
parent
47b3b9bcca
commit
f07d1904ba
@ -76,7 +76,7 @@ file(File, Options0) ->
|
|||||||
{ok, Bin} -> from_string(Bin, [{src_file, File} | Options]);
|
{ok, Bin} -> from_string(Bin, [{src_file, File} | Options]);
|
||||||
{error, Error} ->
|
{error, Error} ->
|
||||||
Msg = lists:flatten([File,": ",file:format_error(Error)]),
|
Msg = lists:flatten([File,": ",file:format_error(Error)]),
|
||||||
Pos = aeso_errors:pos(File, 0, 0),
|
Pos = aeso_errors:pos(0, 0),
|
||||||
{error, [aeso_errors:new(file_error, Pos, Msg)]}
|
{error, [aeso_errors:new(file_error, Pos, Msg)]}
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
@ -35,8 +35,7 @@ simple_compile_test_() ->
|
|||||||
[ {"Test file not found error",
|
[ {"Test file not found error",
|
||||||
fun() ->
|
fun() ->
|
||||||
{error, Errors} = aeso_compiler:file("does_not_exist.aes"),
|
{error, Errors} = aeso_compiler:file("does_not_exist.aes"),
|
||||||
ExpErr = <<"In 'does_not_exist.aes' at line 0, col 0:\n"
|
ExpErr = <<"does_not_exist.aes: no such file or directory">>,
|
||||||
"does_not_exist.aes: no such file or directory">>,
|
|
||||||
check_errors([ExpErr], Errors)
|
check_errors([ExpErr], Errors)
|
||||||
end} ] ++
|
end} ] ++
|
||||||
[ {"Testing error messages of " ++ ContractName,
|
[ {"Testing error messages of " ++ ContractName,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user