From 6f0c4c412982a0e585d7403df1a2e2cafe935148 Mon Sep 17 00:00:00 2001 From: Gaith Hallak Date: Mon, 20 Dec 2021 12:26:10 +0200 Subject: [PATCH] Add new line after error message --- src/aeso_errors.erl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/aeso_errors.erl b/src/aeso_errors.erl index 3c77738..3ea0937 100644 --- a/src/aeso_errors.erl +++ b/src/aeso_errors.erl @@ -69,7 +69,7 @@ msg(#err{ message = Msg, context = none }) -> Msg; msg(#err{ message = Msg, context = Ctxt }) -> Msg ++ "\n" ++ Ctxt. err_msg(#err{ pos = Pos } = Err) -> - lists:flatten(io_lib:format("~s~s", [str_pos(Pos), msg(Err)])). + lists:flatten(io_lib:format("~s~s\n", [str_pos(Pos), msg(Err)])). str_pos(#pos{file = no_file, line = L, col = C}) -> io_lib:format("~p:~p:", [L, C]); @@ -79,7 +79,7 @@ str_pos(#pos{file = F, line = L, col = C}) -> type(#err{ type = Type }) -> Type. pp(#err{ type = Kind, pos = Pos } = Err) -> - lists:flatten(io_lib:format("~s~s:\n~s", [pp_kind(Kind), pp_pos(Pos), msg(Err)])). + lists:flatten(io_lib:format("~s~s:\n~s\n", [pp_kind(Kind), pp_pos(Pos), msg(Err)])). pp_kind(type_error) -> "Type error"; pp_kind(parse_error) -> "Parse error";