summaryrefslogtreecommitdiff
path: root/src/rebar_prv_xref.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/rebar_prv_xref.erl')
-rw-r--r--src/rebar_prv_xref.erl10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/rebar_prv_xref.erl b/src/rebar_prv_xref.erl
index 1d1afa0..ed53da6 100644
--- a/src/rebar_prv_xref.erl
+++ b/src/rebar_prv_xref.erl
@@ -248,11 +248,11 @@ format_mfa_source(MFA) ->
%% Extract an element from a tuple, or undefined if N > tuple size
%%
safe_element(N, Tuple) ->
- case catch(element(N, Tuple)) of
- {'EXIT', {badarg, _}} ->
- undefined;
- Value ->
- Value
+ try
+ element(N, Tuple)
+ catch
+ error:badarg ->
+ undefined
end.
%%