Skip to content

Commit

Permalink
fix a few more invalid Exception.blame usages
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaszsamson committed Mar 8, 2024
1 parent a183ca3 commit 33eb7ab
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion lib/elixir_sense/core/introspection.ex
Original file line number Diff line number Diff line change
Expand Up @@ -892,7 +892,7 @@ defmodule ElixirSense.Core.Introspection do
rescue
e ->
Logger.warning(
"Unable to expand alias #{inspect(mod)}; env aliases #{inspect(aliases)}: #{Exception.blame(:error, e, __STACKTRACE__)}"
"Unable to expand alias #{inspect(mod)}; env aliases #{inspect(aliases)}: #{Exception.format(:error, e, __STACKTRACE__)}"
)

mod
Expand Down
6 changes: 3 additions & 3 deletions lib/elixir_sense/core/normalized/code/fragment.ex
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ defmodule ElixirSense.Core.Normalized.Code.Fragment do
e ->
if Version.match?(System.version(), ">= 1.16.0-dev") do
Logger.error(
"Code.Fragment.cursor_context raised #{Exception.blame(:error, e, __STACKTRACE__)}. Please report that to elixir project."
"Code.Fragment.cursor_context raised #{Exception.format(:error, e, __STACKTRACE__)}. Please report that to elixir project."
)

reraise e, __STACKTRACE__
Expand All @@ -46,7 +46,7 @@ defmodule ElixirSense.Core.Normalized.Code.Fragment do
e ->
if Version.match?(System.version(), ">= 1.16.0-dev") do
Logger.error(
"Code.Fragment.surround_context raised #{Exception.blame(:error, e, __STACKTRACE__)}. Please report that to elixir project."
"Code.Fragment.surround_context raised #{Exception.format(:error, e, __STACKTRACE__)}. Please report that to elixir project."
)

reraise e, __STACKTRACE__
Expand Down Expand Up @@ -74,7 +74,7 @@ defmodule ElixirSense.Core.Normalized.Code.Fragment do
if Version.match?(System.version(), ">= 1.16.0-dev") do
try do
Logger.error(
"Code.Fragment.container_cursor_to_quoted raised #{Exception.blame(:error, e, __STACKTRACE__)}. Please report that to elixir project."
"Code.Fragment.container_cursor_to_quoted raised #{Exception.format(:error, e, __STACKTRACE__)}. Please report that to elixir project."
)
rescue
_ -> :ok
Expand Down
2 changes: 1 addition & 1 deletion lib/elixir_sense/core/normalized/tokenizer.ex
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ defmodule ElixirSense.Core.Normalized.Tokenizer do
e ->
if Version.match?(System.version(), ">= 1.16.0-dev") do
Logger.error(
":elixir_tokenizer.tokenize raised #{Exception.blame(:error, e, __STACKTRACE__)}. Please report that to elixir project."
":elixir_tokenizer.tokenize raised #{Exception.format(:error, e, __STACKTRACE__)}. Please report that to elixir project."
)

reraise e, __STACKTRACE__
Expand Down
6 changes: 3 additions & 3 deletions lib/elixir_sense/core/normalized/typespec.ex
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ defmodule ElixirSense.Core.Normalized.Typespec do
# fixed in elixir 1.16.0
if Version.match?(System.version(), ">= 1.16.0-dev") do
Logger.error(
"Code.Typespec.fetch_specs raised #{Exception.blame(:error, e, __STACKTRACE__)}. Please report that to elixir project."
"Code.Typespec.fetch_specs raised #{Exception.format(:error, e, __STACKTRACE__)}. Please report that to elixir project."
)

reraise e, __STACKTRACE__
Expand All @@ -35,7 +35,7 @@ defmodule ElixirSense.Core.Normalized.Typespec do
# fixed in elixir 1.16.0
if Version.match?(System.version(), ">= 1.16.0-dev") do
Logger.error(
"Code.Typespec.fetch_types raised #{Exception.blame(:error, e, __STACKTRACE__)}. Please report that to elixir project."
"Code.Typespec.fetch_types raised #{Exception.format(:error, e, __STACKTRACE__)}. Please report that to elixir project."
)

reraise e, __STACKTRACE__
Expand All @@ -55,7 +55,7 @@ defmodule ElixirSense.Core.Normalized.Typespec do
# fixed in elixir 1.16.0
if Version.match?(System.version(), ">= 1.16.0-dev") do
Logger.error(
"Code.Typespec.fetch_callbacks raised #{Exception.blame(:error, e, __STACKTRACE__)}. Please report that to elixir project."
"Code.Typespec.fetch_callbacks raised #{Exception.format(:error, e, __STACKTRACE__)}. Please report that to elixir project."
)

reraise e, __STACKTRACE__
Expand Down

0 comments on commit 33eb7ab

Please sign in to comment.