From 4549bad4f6aa3ebc6a081ffecd8c4ec4429bebe8 Mon Sep 17 00:00:00 2001 From: Yurii Rashkovskii Date: Wed, 29 Feb 2012 19:55:32 -0800 Subject: [PATCH] htoad_transform should not hijack compilation errors and return forms as is so that the compiler could catch them --- apps/htoad/src/htoad_transform.erl | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/apps/htoad/src/htoad_transform.erl b/apps/htoad/src/htoad_transform.erl index 52e7d38..b6c6fe5 100644 --- a/apps/htoad/src/htoad_transform.erl +++ b/apps/htoad/src/htoad_transform.erl @@ -21,10 +21,8 @@ parse_transform(Forms, Options) -> #context{ file = File } = parse_trans:initial_context(Forms, Options), case erl_lint:module(Forms, File, [nowarn_unused_function,nowarn_unused_vars,nowarn_unused_record]) of - {error, Errors, Warnings} -> - (length(Warnings) > 0 andalso - lager:debug("erl_lint warnings in ~s: ~p", [File, Warnings])), - throw({erl_lint, Errors}); + {error, _Errors, _Warnings} -> + Forms; {ok, Warnings} when is_list(Warnings), length(Warnings) > 0 -> lager:debug("erl_lint warnings in ~s: ~p", [File, Warnings]); _ ->