aboutsummaryrefslogtreecommitdiffstats
path: root/src/rcl_provider.erl
diff options
context:
space:
mode:
authorEric <[email protected]>2012-12-06 18:12:53 -0500
committerJordan Wilberding <[email protected]>2012-12-07 05:49:59 -0700
commit819690cd8bda0f7f91740b8fa5df71256656de52 (patch)
treeb5e1d71e7935e0f1f3a9118638e05c574f8a63aa /src/rcl_provider.erl
parentd88598d9748c89a7f3d041e078bc8e2b544b5da9 (diff)
downloadrelx-819690cd8bda0f7f91740b8fa5df71256656de52.tar.gz
relx-819690cd8bda0f7f91740b8fa5df71256656de52.tar.bz2
relx-819690cd8bda0f7f91740b8fa5df71256656de52.zip
fix nasty bug that didn't let relcool output errors
Signed-off-by: Jordan Wilberding <[email protected]>
Diffstat (limited to 'src/rcl_provider.erl')
-rw-r--r--src/rcl_provider.erl7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/rcl_provider.erl b/src/rcl_provider.erl
index 9d1dd88..c3ef434 100644
--- a/src/rcl_provider.erl
+++ b/src/rcl_provider.erl
@@ -10,6 +10,7 @@
%% API
-export([new/2,
do/2,
+ impl/1,
format_error/1,
format_error/2,
format/1]).
@@ -57,6 +58,12 @@ new(ModuleName, State0) when is_atom(ModuleName) ->
do({?MODULE, Mod}, State) ->
Mod:do(State).
+%%% @doc get the name of the module that implements the provider
+%%% @param Provider the provider object
+-spec impl(Provider::t()) -> module().
+impl({?MODULE, Mod}) ->
+ Mod.
+
%% @doc format an error produced from a provider.
-spec format_error(Reason::term()) -> iolist().
format_error({non_existing, ModuleName}) ->