summaryrefslogtreecommitdiff
path: root/lib/hipe/test/basic_SUITE_data/basic_exceptions.erl
diff options
context:
space:
mode:
Diffstat (limited to 'lib/hipe/test/basic_SUITE_data/basic_exceptions.erl')
-rw-r--r--lib/hipe/test/basic_SUITE_data/basic_exceptions.erl15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/hipe/test/basic_SUITE_data/basic_exceptions.erl b/lib/hipe/test/basic_SUITE_data/basic_exceptions.erl
index ba9c03d4ba..9f79231e5a 100644
--- a/lib/hipe/test/basic_SUITE_data/basic_exceptions.erl
+++ b/lib/hipe/test/basic_SUITE_data/basic_exceptions.erl
@@ -25,6 +25,7 @@ test() ->
ok = test_guard_bif(),
ok = test_eclectic(),
ok = test_raise(),
+ ok = test_effect(),
ok.
%%--------------------------------------------------------------------
@@ -675,4 +676,18 @@ do_test_raise_3(Expr) ->
erlang:raise(exit, {exception,C,E}, Stk)
end.
+test_effect() ->
+ ok = effect_try(2),
+ {'EXIT',{badarith,_}} = (catch effect_try(bad)),
+ ok.
+
+effect_try(X) ->
+ try
+ X + 1
+ catch
+ C:E:Stk ->
+ erlang:raise(C, E, Stk)
+ end,
+ ok.
+
id(I) -> I.