From 36a9900577c27b1bda7e2e246d2f7d6c5397f6ba Mon Sep 17 00:00:00 2001 From: Lukasz Samson Date: Thu, 9 Nov 2023 17:32:44 +0100 Subject: [PATCH] avoid constructing structs as it may fail --- lib/elixir_sense/core/introspection.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/elixir_sense/core/introspection.ex b/lib/elixir_sense/core/introspection.ex index f189b439..813c462f 100644 --- a/lib/elixir_sense/core/introspection.ex +++ b/lib/elixir_sense/core/introspection.ex @@ -654,7 +654,7 @@ defmodule ElixirSense.Core.Introspection do :implementation has_func.(:__struct__, 0) -> - if Map.get(module.__struct__, :__exception__) do + if has_func.(:exception, 1) do :exception else :struct