aboutsummaryrefslogtreecommitdiffstats
path: root/lib/asn1/src/asn1rt.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2014-12-03 08:09:04 +0100
committerBjörn Gustavsson <[email protected]>2015-01-12 12:22:56 +0100
commitb718f376519c89c60805b26efb54b4c4b5b8b908 (patch)
treee4c01094dcc994b47806319ef36f2786a24d3d1a /lib/asn1/src/asn1rt.erl
parent0aaff8007df99512acb300f610283523d9f05945 (diff)
downloadotp-b718f376519c89c60805b26efb54b4c4b5b8b908.tar.gz
otp-b718f376519c89c60805b26efb54b4c4b5b8b908.tar.bz2
otp-b718f376519c89c60805b26efb54b4c4b5b8b908.zip
asn1ct_parser2: Eliminate all uses of old-style 'catch'
Most uses of 'catch' are not necessary. For example, parse_or/2 is typically called like this: case catch parse_or(Tokens, Flist) of {'EXIT',Reason} -> exit(Reason); {asn1_error,_}=AsnErr -> throw(AsnErr); Result -> Result end. Since {asn1_error,_} is always thrown (never returned) and a successful is always returned (never thrown), the 'case' and the 'catch' are not necessary. The code can be simplified too: parse_or(Tokens, Flist) In a few cases, we will need to replace the 'catch' with 'try'...'catch'.
Diffstat (limited to 'lib/asn1/src/asn1rt.erl')
0 files changed, 0 insertions, 0 deletions