File 0322-Report-an-else_clause-exception-nicely-in-the-shell.patch of Package erlang
From fa907aa4ecc4dda1af8f7ab61e1f065cd0f671d9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= <bjorn@erlang.org>
Date: Wed, 31 May 2023 15:12:28 +0200
Subject: [PATCH] Report an else_clause exception nicely in the shell
Closes #7258
---
lib/stdlib/src/erl_error.erl | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/stdlib/src/erl_error.erl b/lib/stdlib/src/erl_error.erl
index e3e7e11ff9..cd8a8b737b 100644
--- a/lib/stdlib/src/erl_error.erl
+++ b/lib/stdlib/src/erl_error.erl
@@ -216,6 +216,8 @@ explain_reason({case_clause,V}, error=Cl, [], PF, S, _Enc, CL) ->
%% "there is no case clause with a true guard sequence and a
%% pattern matching..."
format_value(V, <<"no case clause matching ">>, Cl, PF, S, CL);
+explain_reason({else_clause,V}, error=Cl, [], PF, S, _Enc, CL) ->
+ format_value(V, <<"no else clause matching ">>, Cl, PF, S, CL);
explain_reason(function_clause, error, [{F,A}], _PF, _S, _Enc, _CL) ->
%% Shell commands
FAs = io_lib:fwrite(<<"~w/~w">>, [F, A]),
--
2.35.3