aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel
diff options
context:
space:
mode:
authorZandra Hird <[email protected]>2015-02-27 12:21:21 +0100
committerZandra Hird <[email protected]>2015-02-27 12:21:21 +0100
commit5f08be20308db9680c9d7e1f01242cedd84a2b4e (patch)
tree31b869902c1fdc91d8f539498dcf7837cb077a19 /lib/kernel
parent8aeb3b3b2e5e5c51e0cf1e78bec68cb75d63455c (diff)
parent4f856c3667dfe7b5ddfedea5035120d85cd001dc (diff)
downloadotp-5f08be20308db9680c9d7e1f01242cedd84a2b4e.tar.gz
otp-5f08be20308db9680c9d7e1f01242cedd84a2b4e.tar.bz2
otp-5f08be20308db9680c9d7e1f01242cedd84a2b4e.zip
Merge branch 'maint'
Diffstat (limited to 'lib/kernel')
-rw-r--r--lib/kernel/src/application_controller.erl14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/kernel/src/application_controller.erl b/lib/kernel/src/application_controller.erl
index daad45b6c2..6635885aaf 100644
--- a/lib/kernel/src/application_controller.erl
+++ b/lib/kernel/src/application_controller.erl
@@ -1615,7 +1615,6 @@ conv([Key, Val | T]) ->
[{make_term(Key), make_term(Val)} | conv(T)];
conv(_) -> [].
-%%% Fix some day: eliminate the duplicated code here
make_term(Str) ->
case erl_scan:string(Str) of
{ok, Tokens, _} ->
@@ -1623,16 +1622,17 @@ make_term(Str) ->
{ok, Term} ->
Term;
{error, {_,M,Reason}} ->
- error_logger:format("application_controller: ~ts: ~ts~n",
- [M:format_error(Reason), Str]),
- throw({error, {bad_environment_value, Str}})
+ handle_make_term_error(M, Reason, Str)
end;
{error, {_,M,Reason}, _} ->
- error_logger:format("application_controller: ~ts: ~ts~n",
- [M:format_error(Reason), Str]),
- throw({error, {bad_environment_value, Str}})
+ handle_make_term_error(M, Reason, Str)
end.
+handle_make_term_error(Mod, Reason, Str) ->
+ error_logger:format("application_controller: ~ts: ~ts~n",
+ [Mod:format_error(Reason), Str]),
+ throw({error, {bad_environment_value, Str}}).
+
get_env_i(Name, #state{conf_data = ConfData}) when is_list(ConfData) ->
case lists:keyfind(Name, 1, ConfData) of
{_Name, Env} -> Env;