Permalink
Browse files

New edoc on R14B02

  • Loading branch information...
1 parent 2651ef3 commit f763f6fb840bf661473d317164ada2fd13ff8c33 Fernando Benavides committed Mar 21, 2011
Showing with 1 addition and 16 deletions.
  1. +1 −0 rebar.config
  2. +0 −1 src/riak_err_app.erl
  3. +0 −6 src/riak_err_handler.erl
  4. +0 −2 src/riak_err_monitor.erl
  5. +0 −6 src/riak_err_stdlib.erl
  6. +0 −1 src/riak_err_sup.erl
View
1 rebar.config
@@ -12,5 +12,6 @@
warn_exported_vars,
warn_missing_spec,
warn_untyped_record, debug_info]}.
+{edoc_opts, [{report_missing_types, true}]}.
{dialyzer_opts, [{warnings, [unmatched_returns, error_handling, race_conditions, behaviours]}]}.
{xref_checks, [undefined_function_calls]}.
View
1 src/riak_err_app.erl
@@ -102,7 +102,6 @@
stop/1]).
%% @doc Starts the application
-%% @spec start() -> 'ok' | {'error', term()}
-spec start() -> 'ok' | {'error', term()}.
start() ->
application:start(riak_err).
View
6 src/riak_err_handler.erl
@@ -77,32 +77,27 @@
%% @doc Add a supervised handler to the OTP kernel's
%% <tt>error_logger</tt> event server.
-%% @spec add_sup_handler() -> term()
-spec add_sup_handler() -> term().
add_sup_handler() ->
gen_event:add_sup_handler(error_logger, ?MODULE, []).
%% @doc Change the internal value of <tt>term_max_size</tt>.
-%% @spec set_term_max_size(pos_integer()) -> ok
-spec set_term_max_size(pos_integer()) -> ok.
set_term_max_size(Num) ->
gen_event:call(error_logger, ?MODULE, {set_term_max_size, Num}, infinity).
%% @doc Change the internal value of <tt>fmt_max_bytes</tt>.
-%% @spec set_fmt_max_bytes(pos_integer()) -> ok
-spec set_fmt_max_bytes(pos_integer()) -> ok.
set_fmt_max_bytes(Num) ->
gen_event:call(error_logger, ?MODULE, {set_fmt_max_bytes, Num}, infinity).
%% @doc Tell our error handler to reopen the <tt>sasl_error_logger</tt> file's
%% file handle (e.g., to assist log file rotation schemes).
-%% @spec reopen_log_file() -> ok
-spec reopen_log_file() -> ok.
reopen_log_file() ->
gen_event:call(error_logger, riak_err_handler, reopen_log_file, infinity).
%% @doc Debugging: get internal state record.
-%% @spec get_state() -> #state{}
-spec get_state() -> #state{}.
get_state() ->
gen_event:call(error_logger, ?MODULE, {get_state}, infinity).
@@ -256,7 +251,6 @@ format_event(Event, TermMaxSize, FmtMaxBytes) ->
%% If the Args list's size is larger than TermMaxSize, then the
%% formatting is done by trunc_io:print/2, where FmtMaxBytes is used
%% to limit the formatted string's size.
-%% @spec limited_fmt(string(), list(), integer(), integer()) -> iolist()
-spec limited_fmt(string(), list(), integer(), integer()) -> iolist().
limited_fmt(Fmt, Args, TermMaxSize, FmtMaxBytes) ->
TermSize = erts_debug:flat_size(Args),
View
2 src/riak_err_monitor.erl
@@ -39,13 +39,11 @@
%%% API
%%%----------------------------------------------------------------------
%% @doc Starts the monitor
-%% @spec start_link() -> {ok, pid()} | ignore | {error, term()}
-spec start_link() -> {ok, pid()} | ignore | {error, term()}.
start_link() ->
gen_server:start_link({local, ?NAME}, ?MODULE, [], []).
%% @doc Stops the monitor
-%% @spec stop() -> ok
-spec stop() -> ok.
stop() ->
gen_event:call(?NAME, stop, infinity).
View
6 src/riak_err_stdlib.erl
@@ -42,7 +42,6 @@
%% @doc From OTP stdlib's error_logger_tty_h.erl ... These functions aren't
%% exported.
-%% @spec write_time({utc, t_datetime1970()} | t_datetime1970(), string()) -> string()
-spec write_time({utc, t_datetime1970()} | t_datetime1970(), string()) -> string().
write_time({utc,{{Y,Mo,D},{H,Mi,S}}},Type) ->
io_lib:format("~n=~s==== ~p-~s-~p::~s:~s:~s UTC ===~n",
@@ -53,7 +52,6 @@ write_time({{Y,Mo,D},{H,Mi,S}},Type) ->
%% @doc From OTP stdlib's error_logger_tty_h.erl ... These functions aren't
%% exported.
-%% @spec maybe_utc(t_datetime1970()) -> {utc, t_datetime1970()} | t_datetime1970()
-spec maybe_utc(t_datetime1970()) -> {utc, t_datetime1970()} | t_datetime1970().
maybe_utc(Time) ->
UTC = case application:get_env(sasl, utc_log) of
@@ -101,22 +99,19 @@ month(12) -> "Dec".
%% @doc From OTP sasl's sasl_report.erl ... These functions aren't
%% exported.
-%% @spec is_my_error_report(atom()) -> boolean()
-spec is_my_error_report(atom()) -> boolean().
is_my_error_report(supervisor_report) -> true;
is_my_error_report(crash_report) -> true;
is_my_error_report(_) -> false.
%% @doc From OTP sasl's sasl_report.erl ... These functions aren't
%% exported.
-%% @spec is_my_info_report(atom()) -> boolean()
-spec is_my_info_report(atom()) -> boolean().
is_my_info_report(progress) -> true;
is_my_info_report(_) -> false.
%% @doc From OTP sasl's sasl_report.erl ... These functions aren't
%% exported.
-%% @spec sup_get(term(), [proplists:property()]) -> term()
-spec sup_get(term(), [proplists:property()]) -> term().
sup_get(Tag, Report) ->
case lists:keysearch(Tag, 1, Report) of
@@ -127,7 +122,6 @@ sup_get(Tag, Report) ->
end.
%% @doc From OTP stdlib's proc_lib.erl ... These functions aren't exported.
-%% @spec proc_lib_format([term()], pos_integer()) -> string()
-spec proc_lib_format([term()], pos_integer()) -> string().
proc_lib_format([OwnReport,LinkReport], FmtMaxBytes) ->
OwnFormat = format_report(OwnReport, FmtMaxBytes),
View
1 src/riak_err_sup.erl
@@ -31,7 +31,6 @@
-type startlink_ret() :: {'ok', pid()} | 'ignore' | {'error', startlink_err()}.
%% @doc Starts the supervisor
-%% @spec start_link() -> startlink_ret()
-spec start_link() -> startlink_ret().
start_link() ->
supervisor:start_link({local, ?SERVER}, ?MODULE, []).

0 comments on commit f763f6f

Please sign in to comment.