blob: 702b14b5b954336f812385b1296af4bcd4b97ac7 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
-module(trycatch_1).
-export([one_try_catch/1,one_plain_catch/1]).
one_try_catch(Term) ->
try
trycatch_2:two(Term)
catch
C:R ->
Stk = erlang:get_stacktrace(),
{C,R,Stk}
end.
one_plain_catch(Term) ->
{catch trycatch_2:two(Term),erlang:get_stacktrace()}.
|