File 1155-Document-warn_deprecated_catch-option.patch of Package erlang
From 7452c7282c600a89cd9530e10d0156469baf6acc Mon Sep 17 00:00:00 2001
From: Richard Carlsson <carlsson.richard@gmail.com>
Date: Mon, 13 Jan 2025 11:42:45 +0100
Subject: [PATCH 5/5] Document warn_deprecated_catch option
---
lib/compiler/src/compile.erl | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/lib/compiler/src/compile.erl b/lib/compiler/src/compile.erl
index 395c1506bf..71564f9d0f 100644
--- a/lib/compiler/src/compile.erl
+++ b/lib/compiler/src/compile.erl
@@ -656,6 +656,12 @@ value are listed.
Default is to emit warnings for every use of a callback known by the compiler to
be deprecated.
+- **`warn_deprecated_catch`** - Enables warnings for use of old style catch
+ expressions on the form `catch Expr` instead of the modern `try ... catch
+ ... end`. You may enable this compiler option on the project level and
+ add `-compile(nowarn_deprecated_catch).` to individual files which still
+ contain old catches in order to prevent new uses from getting added.
+
- **`nowarn_removed`** - Turns off warnings for calls to functions that have
been removed. Default is to emit warnings for every call to a function known
by the compiler to have been recently removed from Erlang/OTP.
--
2.43.0