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]);
|
||||
{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)]}
|
||||
end.
|
||||
|
||||
|
@ -35,8 +35,7 @@ simple_compile_test_() ->
|
||||
[ {"Test file not found error",
|
||||
fun() ->
|
||||
{error, Errors} = aeso_compiler:file("does_not_exist.aes"),
|
||||
ExpErr = <<"In 'does_not_exist.aes' at line 0, col 0:\n"
|
||||
"does_not_exist.aes: no such file or directory">>,
|
||||
ExpErr = <<"does_not_exist.aes: no such file or directory">>,
|
||||
check_errors([ExpErr], Errors)
|
||||
end} ] ++
|
||||
[ {"Testing error messages of " ++ ContractName,
|
||||
|
Loading…
x
Reference in New Issue
Block a user