aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/src/supervisor.erl
diff options
context:
space:
mode:
authorSiri Hansen <[email protected]>2012-10-11 11:50:40 +0200
committerSiri Hansen <[email protected]>2012-10-11 11:50:40 +0200
commit95af7e7bec94d9ee2ba7cbbe4aa045862ddcd386 (patch)
tree3c692356fb425a33eb9009f85eca8c63cdf782f8 /lib/stdlib/src/supervisor.erl
parent102adf32f766dceee6f277c34111fbe9b8971647 (diff)
downloadotp-95af7e7bec94d9ee2ba7cbbe4aa045862ddcd386.tar.gz
otp-95af7e7bec94d9ee2ba7cbbe4aa045862ddcd386.tar.bz2
otp-95af7e7bec94d9ee2ba7cbbe4aa045862ddcd386.zip
If supervisor:start_link fails to start child, add child id to error reason
Diffstat (limited to 'lib/stdlib/src/supervisor.erl')
-rw-r--r--lib/stdlib/src/supervisor.erl3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/stdlib/src/supervisor.erl b/lib/stdlib/src/supervisor.erl
index 7624c6cd18..9f93747c3e 100644
--- a/lib/stdlib/src/supervisor.erl
+++ b/lib/stdlib/src/supervisor.erl
@@ -297,7 +297,8 @@ start_children([Child|Chs], NChildren, SupName) ->
start_children(Chs, [Child#child{pid = Pid}|NChildren], SupName);
{error, Reason} ->
report_error(start_error, Reason, Child, SupName),
- {error, lists:reverse(Chs) ++ [Child | NChildren], Reason}
+ {error, lists:reverse(Chs) ++ [Child | NChildren],
+ {failed_to_start_child,Child#child.name,Reason}}
end;
start_children([], NChildren, _SupName) ->
{ok, NChildren}.