Permalink
Browse files

Return Default if lager_config:get/2 crashes

  • Loading branch information...
1 parent a192bd9 commit 10744161400ca0d292c50cf936038c9268633505 @Vagabond Vagabond committed Dec 12, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/lager_config.erl
View
@@ -49,11 +49,14 @@ get(Key) ->
end.
get(Key, Default) ->
- case ?MODULE:get(Key) of
+ try ?MODULE:get(Key) of
undefined ->
Default;
Res ->
Res
+ catch
+ _:_ ->
+ Default
end.
set(Key, Value) ->

0 comments on commit 1074416

Please sign in to comment.