Skip to content

Commit

Permalink
Add ability to use additional custom errors when parsing options
Browse files Browse the repository at this point in the history
  • Loading branch information
prefiks committed Apr 17, 2024
1 parent 051bf29 commit 0fdf58b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/econf.erl
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,11 @@ format_error(eimp_error) ->
format("ejabberd is built without image converter support", []);
format_error({mqtt_codec, Reason}) ->
mqtt_codec:format_error(Reason);
format_error({external_module_error, Module, Error}) ->
try Module:format_error(Error)
catch _:_ ->
format("Invalid value", [])
end;
format_error(Reason) ->
yconf:format_error(Reason).

Expand Down

0 comments on commit 0fdf58b

Please sign in to comment.