Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

better errors

Signed-off-by: Alexander Dorofeev <aka.spin@gmail.com>
  • Loading branch information...
commit 5c30023e07e47eeddbd819fd8afa36bbddc67fb3 1 parent 669efb6
@akaspin akaspin authored
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
8 src/erldocs_core.erl
@@ -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().
Please sign in to comment.
Something went wrong with that request. Please try again.