Package not found: openSUSE:Factory/deepin-image-viewer

File 9201-erl_parse.yrl-Eliminate-old-style-catches.patch of Package erlang

From 22fe97d2c3228d5166f3d61799f09a4f49767161 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= <bjorn@erlang.org>
Date: Sat, 11 Jan 2025 07:51:53 +0100
Subject: [PATCH 1/7] erl_parse.yrl: Eliminate old-style catches

---
 lib/stdlib/src/erl_parse.yrl | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/lib/stdlib/src/erl_parse.yrl b/lib/stdlib/src/erl_parse.yrl
index 7911135eaa..585681979c 100644
--- a/lib/stdlib/src/erl_parse.yrl
+++ b/lib/stdlib/src/erl_parse.yrl
@@ -1898,7 +1896,12 @@ first_anno(Abstract) ->
                         throw(Anno1)
                 end
         end,
-    catch fold_anno(F, Anno0, Abstract).
+    try fold_anno(F, Anno0, Abstract) of
+        Anno -> Anno
+    catch
+        throw:Anno ->
+            Anno
+    end.
 
 last_anno(Abstract) ->
     Fun = fun(Anno, '*') ->
-- 
2.51.0

openSUSE Build Service is sponsored by