From e6caab00d597702877fc16aa705fe1d48a6d9395 Mon Sep 17 00:00:00 2001 From: Tuncer Ayaz Date: Tue, 17 Jan 2012 11:53:59 +0100 Subject: [PATCH] Use ?ERROR where appropriate --- src/rebar_abnfc_compiler.erl | 6 +++--- src/rebar_erlydtl_compiler.erl | 6 +++--- src/rebar_lfe_compiler.erl | 2 +- src/rebar_neotoma_compiler.erl | 8 ++++---- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/rebar_abnfc_compiler.erl b/src/rebar_abnfc_compiler.erl index bfb9a35..db9e029 100644 --- a/src/rebar_abnfc_compiler.erl +++ b/src/rebar_abnfc_compiler.erl @@ -84,7 +84,7 @@ abnfc_is_present() -> compile_abnfc(Source, _Target, Config) -> case abnfc_is_present() of false -> - ?CONSOLE( + ?ERROR( <<"~n===============================================~n" " You need to install abnfc to compile ABNF grammars~n" " Download the latest tarball release from github~n" @@ -102,8 +102,8 @@ compile_abnfc(Source, _Target, Config) -> case abnfc:file(Source, Opts) of ok -> ok; Error -> - ?CONSOLE("Compiling grammar ~s failed:~n ~p~n", - [Source, Error]), + ?ERROR("Compiling grammar ~s failed:~n ~p~n", + [Source, Error]), ?FAIL end end. diff --git a/src/rebar_erlydtl_compiler.erl b/src/rebar_erlydtl_compiler.erl index f17e8fd..0bb1a72 100644 --- a/src/rebar_erlydtl_compiler.erl +++ b/src/rebar_erlydtl_compiler.erl @@ -109,7 +109,7 @@ default(custom_tags_dir) -> "". compile_dtl(Source, Target, Config) -> case code:which(erlydtl) of non_existing -> - ?CONSOLE( + ?ERROR( <<"~n===============================================~n" " You need to install erlydtl to compile DTL templates~n" " Download the latest tarball release from github~n" @@ -140,8 +140,8 @@ do_compile(Source, Target, Config) -> Opts++DtlOpts) of ok -> ok; Reason -> - ?CONSOLE("Compiling template ~s failed:~n ~p~n", - [Source, Reason]), + ?ERROR("Compiling template ~s failed:~n ~p~n", + [Source, Reason]), ?FAIL end. diff --git a/src/rebar_lfe_compiler.erl b/src/rebar_lfe_compiler.erl index 3775735..48a92a2 100644 --- a/src/rebar_lfe_compiler.erl +++ b/src/rebar_lfe_compiler.erl @@ -48,7 +48,7 @@ compile(Config, _AppFile) -> compile_lfe(Source, _Target, Config) -> case code:which(lfe_comp) of non_existing -> - ?CONSOLE(<< + ?ERROR(<< "~n" "*** MISSING LFE COMPILER ***~n" " You must do one of the following:~n" diff --git a/src/rebar_neotoma_compiler.erl b/src/rebar_neotoma_compiler.erl index e84ab2a..988fa42 100644 --- a/src/rebar_neotoma_compiler.erl +++ b/src/rebar_neotoma_compiler.erl @@ -74,7 +74,7 @@ default(source_ext) -> ".peg". compile_neo(Source, Target, Config) -> case code:which(neotoma) of non_existing -> - ?CONSOLE( + ?ERROR( <<"~n===============================================~n" " You need to install neotoma to compile PEG grammars~n" " Download the latest tarball release from github~n" @@ -101,10 +101,10 @@ do_compile(Source, _Target, Config) -> ++ option(module_ext, NeoOpts))}], case neotoma:file(Source, Opts ++ NeoOpts) of ok -> - ok; + ok; Reason -> - ?CONSOLE("Compiling peg ~s failed:~n ~p~n", - [Source, Reason]), + ?ERROR("Compiling peg ~s failed:~n ~p~n", + [Source, Reason]), ?FAIL end.