From 125d55527d4a8718c985080f95e4ad2470ecca05 Mon Sep 17 00:00:00 2001 From: Jean Klingler Date: Thu, 6 Jun 2024 21:15:11 +0900 Subject: [PATCH] Add more information to anonymous rescue hint (#13641) --- lib/elixir/lib/module/types/helpers.ex | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/elixir/lib/module/types/helpers.ex b/lib/elixir/lib/module/types/helpers.ex index a55e8fd65f2..cc62f46bff6 100644 --- a/lib/elixir/lib/module/types/helpers.ex +++ b/lib/elixir/lib/module/types/helpers.ex @@ -41,7 +41,9 @@ defmodule Module.Types.Helpers do """ #{hint()} when you rescue without specifying exception names, \ - the variable is assigned a type of a struct but all of its fields are unknown + the variable is assigned a type of a struct but all of its fields are unknown. \ + If you are trying to access an exception's :message key, either specify the \ + exception names or use `Exception.message/1`. """ end) end