diff options
author | Björn Gustavsson <[email protected]> | 2017-10-06 09:25:53 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2017-10-11 09:59:41 +0200 |
commit | 119713b4d9ad6649aa5f1d0bf492e2f35a0ced01 (patch) | |
tree | f9643f6f423116af35d06f0b85f1bd5601f365be /lib/kernel | |
parent | 5fa3ac7e10f45ad433ac6a44f32f9b5e96b56fcd (diff) | |
download | otp-119713b4d9ad6649aa5f1d0bf492e2f35a0ced01.tar.gz otp-119713b4d9ad6649aa5f1d0bf492e2f35a0ced01.tar.bz2 otp-119713b4d9ad6649aa5f1d0bf492e2f35a0ced01.zip |
Optimize a catch whose return value is ignored
Rewrite a catch expression like this:
catch side_effect(),
...
to:
try
side_effect()
catch
_:_ ->
ok
end,
...
A try/catch is more efficient since no stack trace will be built
when an exception occurs.
Diffstat (limited to 'lib/kernel')
0 files changed, 0 insertions, 0 deletions