From 7bef45816309e7bd73719281e32afade77439cfb Mon Sep 17 00:00:00 2001 From: Yurin Slava Date: Mon, 18 Jun 2012 10:44:35 +0700 Subject: [PATCH] Add support for errors without line number --- src/rebar_base_compiler.erl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/rebar_base_compiler.erl b/src/rebar_base_compiler.erl index 3d4447f..7d1fb22 100644 --- a/src/rebar_base_compiler.erl +++ b/src/rebar_base_compiler.erl @@ -245,4 +245,7 @@ format_error(AbsSource, Extra, {{Line, Column}, Mod, Desc}) -> ?FMT("~s:~w:~w: ~s~s~n", [AbsSource, Line, Column, Extra, ErrorDesc]); format_error(AbsSource, Extra, {Line, Mod, Desc}) -> ErrorDesc = Mod:format_error(Desc), - ?FMT("~s:~w: ~s~s~n", [AbsSource, Line, Extra, ErrorDesc]). + ?FMT("~s:~w: ~s~s~n", [AbsSource, Line, Extra, ErrorDesc]); +format_error(AbsSource, Extra, {Mod, Desc}) -> + ErrorDesc = Mod:format_error(Desc), + ?FMT("~s: ~s~s~n", [AbsSource, Extra, ErrorDesc]).