Skip to content

Commit 7452c72

Browse files
committed
Document warn_deprecated_catch option
1 parent 21471e4 commit 7452c72

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/compiler/src/compile.erl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -656,6 +656,12 @@ value are listed.
656656
Default is to emit warnings for every use of a callback known by the compiler to
657657
be deprecated.
658658

659+
- **`warn_deprecated_catch`** - Enables warnings for use of old style catch
660+
expressions on the form `catch Expr` instead of the modern `try ... catch
661+
... end`. You may enable this compiler option on the project level and
662+
add `-compile(nowarn_deprecated_catch).` to individual files which still
663+
contain old catches in order to prevent new uses from getting added.
664+
659665
- **`nowarn_removed`** - Turns off warnings for calls to functions that have
660666
been removed. Default is to emit warnings for every call to a function known
661667
by the compiler to have been recently removed from Erlang/OTP.

0 commit comments

Comments
 (0)