aboutsummaryrefslogtreecommitdiffstats
path: root/lib/test_server/src/test_server_sup.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2011-02-22 12:11:30 +0100
committerBjörn Gustavsson <[email protected]>2011-08-18 10:00:28 +0200
commitf43c0a51cd15b2b0f8adba4bb9ec5531dd9d8820 (patch)
tree10f86e9e6f6e9a409123093bf3fcc1cdb01658b9 /lib/test_server/src/test_server_sup.erl
parentff79167a09a55c4dc57c7ce4b245235b03b00d9c (diff)
downloadotp-f43c0a51cd15b2b0f8adba4bb9ec5531dd9d8820.tar.gz
otp-f43c0a51cd15b2b0f8adba4bb9ec5531dd9d8820.tar.bz2
otp-f43c0a51cd15b2b0f8adba4bb9ec5531dd9d8820.zip
common_test: Use line numbers in exceptions
Remove the old kludgy parse transformations and line numbers macros in common_test and test_server, and use the line numbers in exceptions instead.
Diffstat (limited to 'lib/test_server/src/test_server_sup.erl')
-rw-r--r--lib/test_server/src/test_server_sup.erl11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/test_server/src/test_server_sup.erl b/lib/test_server/src/test_server_sup.erl
index 53dfb45e3a..ec9be52bd3 100644
--- a/lib/test_server/src/test_server_sup.erl
+++ b/lib/test_server/src/test_server_sup.erl
@@ -51,18 +51,19 @@ timetrap(Timeout0, Scale, Pid) ->
Timeout = if not Scale -> Timeout0;
true -> test_server:timetrap_scale_factor() * Timeout0
end,
+ TruncTO = trunc(Timeout),
receive
- after trunc(Timeout) ->
- Line = test_server:get_loc(Pid),
+ after TruncTO ->
+ MFLs = test_server:get_loc(Pid),
Mon = erlang:monitor(process, Pid),
Trap =
case get(test_server_init_or_end_conf) of
undefined ->
- {timetrap_timeout,trunc(Timeout),Line};
+ {timetrap_timeout,TruncTO,MFLs};
InitOrEnd ->
- {timetrap_timeout,trunc(Timeout),Line,InitOrEnd}
+ {timetrap_timeout,TruncTO,MFLs,InitOrEnd}
end,
- exit(Pid,Trap),
+ exit(Pid, Trap),
receive
{'DOWN', Mon, process, Pid, _} ->
ok