Permalink
Browse files

better errors

Signed-off-by: Alexander Dorofeev <aka.spin@gmail.com>
  • Loading branch information...
akaspin committed Jul 9, 2011
1 parent 669efb6 commit 5c30023e07e47eeddbd819fd8afa36bbddc67fb3
Showing with 7 additions and 1 deletion.
  1. BIN erldocs
  2. +7 −1 src/erldocs_core.erl
View
BIN erldocs
Binary file not shown.
View
@@ -3,6 +3,12 @@
-export([mapreduce/4, pmapreduce/4, pmapreduce/5]).
-include_lib("kernel/include/file.hrl").
+-ifdef(DEBUG).
+-define(LOG(Str, Args), io:format(Str, Args)).
+-else.
+-define(LOG(_Str, _Args), ok).
+-endif.
+
%% @doc Copy static files
-spec copy_static_files(list()) -> ok.
copy_static_files(Conf) ->
@@ -477,7 +483,7 @@ fmt(Format, Args) ->
log(Str) ->
io:format(Str).
log(Str, Args) ->
- io:format(Str, Args).
+ ?LOG(Str, Args).
%% @doc shorthand for lists:keyfind
-spec kf(term(), list()) -> term().

0 comments on commit 5c30023

Please sign in to comment.