Use ?ERROR where appropriate

This commit is contained in:
Tuncer Ayaz 2012-01-17 11:53:59 +01:00
parent 015e58201c
commit e6caab00d5
4 changed files with 11 additions and 11 deletions

View file

@ -84,7 +84,7 @@ abnfc_is_present() ->
compile_abnfc(Source, _Target, Config) -> compile_abnfc(Source, _Target, Config) ->
case abnfc_is_present() of case abnfc_is_present() of
false -> false ->
?CONSOLE( ?ERROR(
<<"~n===============================================~n" <<"~n===============================================~n"
" You need to install abnfc to compile ABNF grammars~n" " You need to install abnfc to compile ABNF grammars~n"
" Download the latest tarball release from github~n" " Download the latest tarball release from github~n"
@ -102,7 +102,7 @@ compile_abnfc(Source, _Target, Config) ->
case abnfc:file(Source, Opts) of case abnfc:file(Source, Opts) of
ok -> ok; ok -> ok;
Error -> Error ->
?CONSOLE("Compiling grammar ~s failed:~n ~p~n", ?ERROR("Compiling grammar ~s failed:~n ~p~n",
[Source, Error]), [Source, Error]),
?FAIL ?FAIL
end end

View file

@ -109,7 +109,7 @@ default(custom_tags_dir) -> "".
compile_dtl(Source, Target, Config) -> compile_dtl(Source, Target, Config) ->
case code:which(erlydtl) of case code:which(erlydtl) of
non_existing -> non_existing ->
?CONSOLE( ?ERROR(
<<"~n===============================================~n" <<"~n===============================================~n"
" You need to install erlydtl to compile DTL templates~n" " You need to install erlydtl to compile DTL templates~n"
" Download the latest tarball release from github~n" " Download the latest tarball release from github~n"
@ -140,7 +140,7 @@ do_compile(Source, Target, Config) ->
Opts++DtlOpts) of Opts++DtlOpts) of
ok -> ok; ok -> ok;
Reason -> Reason ->
?CONSOLE("Compiling template ~s failed:~n ~p~n", ?ERROR("Compiling template ~s failed:~n ~p~n",
[Source, Reason]), [Source, Reason]),
?FAIL ?FAIL
end. end.

View file

@ -48,7 +48,7 @@ compile(Config, _AppFile) ->
compile_lfe(Source, _Target, Config) -> compile_lfe(Source, _Target, Config) ->
case code:which(lfe_comp) of case code:which(lfe_comp) of
non_existing -> non_existing ->
?CONSOLE(<< ?ERROR(<<
"~n" "~n"
"*** MISSING LFE COMPILER ***~n" "*** MISSING LFE COMPILER ***~n"
" You must do one of the following:~n" " You must do one of the following:~n"

View file

@ -74,7 +74,7 @@ default(source_ext) -> ".peg".
compile_neo(Source, Target, Config) -> compile_neo(Source, Target, Config) ->
case code:which(neotoma) of case code:which(neotoma) of
non_existing -> non_existing ->
?CONSOLE( ?ERROR(
<<"~n===============================================~n" <<"~n===============================================~n"
" You need to install neotoma to compile PEG grammars~n" " You need to install neotoma to compile PEG grammars~n"
" Download the latest tarball release from github~n" " Download the latest tarball release from github~n"
@ -103,7 +103,7 @@ do_compile(Source, _Target, Config) ->
ok -> ok ->
ok; ok;
Reason -> Reason ->
?CONSOLE("Compiling peg ~s failed:~n ~p~n", ?ERROR("Compiling peg ~s failed:~n ~p~n",
[Source, Reason]), [Source, Reason]),
?FAIL ?FAIL
end. end.