aboutsummaryrefslogtreecommitdiffstats
path: root/src/relcool.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/relcool.erl')
-rw-r--r--src/relcool.erl8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/relcool.erl b/src/relcool.erl
index 806f473..13ef2ea 100644
--- a/src/relcool.erl
+++ b/src/relcool.erl
@@ -22,10 +22,13 @@
-export([main/1,
do/7,
+ format_error/1,
opt_spec_list/0]).
-export_type([error/0]).
+-include_lib("relcool/include/relcool.hrl").
+
%%============================================================================
%% types
%%============================================================================
@@ -77,6 +80,11 @@ opt_spec_list() ->
{log_level, $V, "verbose", {integer, 2}, "Verbosity level, maybe between 0 and 2"}
].
+-spec format_error(Reason::term()) -> iolist().
+format_error({invalid_return_value, Provider, Value}) ->
+ [rcl_provider:format(Provider), " returned an invalid value ",
+ io_lib:format("~p", [Value])].
+
%%============================================================================
%% internal api
%%============================================================================