aboutsummaryrefslogtreecommitdiffstats
path: root/lib/hipe/cerl
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2017-04-11 14:39:28 +0200
committerHans Bolinder <[email protected]>2017-06-13 13:40:25 +0200
commitde84a11b97f9b7d3642169b424e418106e117c68 (patch)
treeb3b5b87e397b85a2e56ce5b6321b52f89d292e25 /lib/hipe/cerl
parenta45245a40d66b430a4328c0da393a934bfe5f81f (diff)
downloadotp-de84a11b97f9b7d3642169b424e418106e117c68.tar.gz
otp-de84a11b97f9b7d3642169b424e418106e117c68.tar.bz2
otp-de84a11b97f9b7d3642169b424e418106e117c68.zip
hipe: Remove use of 'catch'
Substitute try/catch for an obsoletely used catch. Thanks to Kostis for pointing it out.
Diffstat (limited to 'lib/hipe/cerl')
-rw-r--r--lib/hipe/cerl/erl_types.erl9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/hipe/cerl/erl_types.erl b/lib/hipe/cerl/erl_types.erl
index 3c6d42572a..cff47dd540 100644
--- a/lib/hipe/cerl/erl_types.erl
+++ b/lib/hipe/cerl/erl_types.erl
@@ -531,7 +531,9 @@ list_contains_opaque(List, Opaques) ->
'error' | {'ok', erl_type(), erl_type()}.
t_find_opaque_mismatch(T1, T2, Opaques) ->
- catch t_find_opaque_mismatch(T1, T2, T2, Opaques).
+ try t_find_opaque_mismatch(T1, T2, T2, Opaques)
+ catch throw:error -> error
+ end.
t_find_opaque_mismatch(?any, _Type, _TopType, _Opaques) -> error;
t_find_opaque_mismatch(?none, _Type, _TopType, _Opaques) -> throw(error);
@@ -583,8 +585,9 @@ t_find_opaque_mismatch_ordlists(L1, L2, TopType, Opaques) ->
t_find_opaque_mismatch_list(List).
t_find_opaque_mismatch_lists(L1, L2, _TopType, Opaques) ->
- List = [catch t_find_opaque_mismatch(T1, T2, T2, Opaques) ||
- T1 <- L1, T2 <- L2],
+ List = [try t_find_opaque_mismatch(T1, T2, T2, Opaques)
+ catch throw:error -> error
+ end || T1 <- L1, T2 <- L2],
t_find_opaque_mismatch_list(List).
t_find_opaque_mismatch_list([]) -> throw(error);