diff options
author | Peter Andersson <[email protected]> | 2010-02-17 15:59:05 +0000 |
---|---|---|
committer | Erlang/OTP <[email protected]> | 2010-02-17 15:59:05 +0000 |
commit | 332591f03f7bc4585c8c108c192ab3bba6fec12c (patch) | |
tree | c3d06e8750d53d0f157d61cd4c5f991959a05a51 /lib/test_server/src/test_server_sup.erl | |
parent | f29538e8002cf0e37fa4f988fbf5484c46513bf4 (diff) | |
download | otp-332591f03f7bc4585c8c108c192ab3bba6fec12c.tar.gz otp-332591f03f7bc4585c8c108c192ab3bba6fec12c.tar.bz2 otp-332591f03f7bc4585c8c108c192ab3bba6fec12c.zip |
OTP-8311: Various updates and fixes in Common Test and Test Server
Diffstat (limited to 'lib/test_server/src/test_server_sup.erl')
-rw-r--r-- | lib/test_server/src/test_server_sup.erl | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/lib/test_server/src/test_server_sup.erl b/lib/test_server/src/test_server_sup.erl index c665f185fd..89edb0f881 100644 --- a/lib/test_server/src/test_server_sup.erl +++ b/lib/test_server/src/test_server_sup.erl @@ -1,19 +1,19 @@ %% %% %CopyrightBegin% -%% -%% Copyright Ericsson AB 1998-2009. All Rights Reserved. -%% +%% +%% Copyright Ericsson AB 1998-2010. All Rights Reserved. +%% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in %% compliance with the License. You should have received a copy of the %% Erlang Public License along with this software. If not, it can be %% retrieved online at http://www.erlang.org/. -%% +%% %% Software distributed under the License is distributed on an "AS IS" %% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See %% the License for the specific language governing rights and limitations %% under the License. -%% +%% %% %CopyrightEnd% %% @@ -497,7 +497,18 @@ framework_call(Callback,Func,Args,DefaultReturn) -> end, case erlang:function_exported(Mod,Func,length(Args)) of true -> - apply(Mod,Func,Args); + EH = fun(Reason) -> exit({fw_error,{Mod,Func,Reason}}) end, + try apply(Mod,Func,Args) of + Result -> + Result + catch + exit:Why -> + EH(Why); + error:Why -> + EH({Why,erlang:get_stacktrace()}); + throw:Why -> + EH(Why) + end; false -> DefaultReturn end. |