Skip to content

Commit

Permalink
handle errors from plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaszsamson committed Oct 31, 2023
1 parent 78a710e commit 4890a2e
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions lib/elixir_sense/providers/suggestion/generic_reducer.ex
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ defmodule ElixirSense.Providers.Suggestion.GenericReducer do
according to the cursor's position in a function call.
"""

require Logger
alias ElixirSense.Plugins.Util

@type func_call :: {module, fun :: atom, arg :: non_neg_integer, any}
Expand Down Expand Up @@ -38,14 +39,30 @@ defmodule ElixirSense.Providers.Suggestion.GenericReducer do
case Util.func_call_chain(text_before, env, buffer_metadata) do
[func_call | _] = chain ->
if function_exported?(reducer, :suggestions, 4) do
reducer.suggestions(hint, func_call, chain, opts) |> handle_suggestions(acc)
try do
reducer.suggestions(hint, func_call, chain, opts) |> handle_suggestions(acc)
catch
kind, payload ->

Check warning on line 45 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test (Elixir 1.14.x | Erlang/OTP 26.x)

variable "payload" is unused (if the variable is not meant to be used, prefix it with an underscore)

Check warning on line 45 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test (Elixir 1.13.x | Erlang/OTP 24.x)

variable "payload" is unused (if the variable is not meant to be used, prefix it with an underscore)

Check warning on line 45 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test (Elixir 1.14.x | Erlang/OTP 23.x)

variable "payload" is unused (if the variable is not meant to be used, prefix it with an underscore)

Check warning on line 45 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test (Elixir 1.15.x | Erlang/OTP 26.x)

variable "payload" is unused (if the variable is not meant to be used, prefix it with an underscore)

Check warning on line 45 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test (Elixir 1.13.x | Erlang/OTP 22.x)

variable "payload" is unused (if the variable is not meant to be used, prefix it with an underscore)

Check warning on line 45 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test (Elixir 1.15.x | Erlang/OTP 25.x)

variable "payload" is unused (if the variable is not meant to be used, prefix it with an underscore)

Check warning on line 45 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test (Elixir 1.14.x | Erlang/OTP 24.x)

variable "payload" is unused (if the variable is not meant to be used, prefix it with an underscore)

Check warning on line 45 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test (Elixir 1.15.x | Erlang/OTP 24.x)

variable "payload" is unused (if the variable is not meant to be used, prefix it with an underscore)

Check warning on line 45 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test (Elixir 1.13.x | Erlang/OTP 23.x)

variable "payload" is unused (if the variable is not meant to be used, prefix it with an underscore)

Check warning on line 45 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test (Elixir 1.14.x | Erlang/OTP 25.x)

variable "payload" is unused (if the variable is not meant to be used, prefix it with an underscore)

Check warning on line 45 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test (Elixir 1.13.x | Erlang/OTP 25.x)

variable "payload" is unused (if the variable is not meant to be used, prefix it with an underscore)

Check warning on line 45 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test windows (Elixir 1.14.x | Erlang/OTP 25.x)

variable "payload" is unused (if the variable is not meant to be used, prefix it with an underscore)

Check warning on line 45 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test windows (Elixir 1.14.x | Erlang/OTP 26.x)

variable "payload" is unused (if the variable is not meant to be used, prefix it with an underscore)

Check warning on line 45 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test windows (Elixir 1.13.x | Erlang/OTP 24.x)

variable "payload" is unused (if the variable is not meant to be used, prefix it with an underscore)

Check warning on line 45 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test windows (Elixir 1.13.x | Erlang/OTP 25.x)

variable "payload" is unused (if the variable is not meant to be used, prefix it with an underscore)

Check warning on line 45 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test windows (Elixir 1.14.x | Erlang/OTP 24.x)

variable "payload" is unused (if the variable is not meant to be used, prefix it with an underscore)

Check warning on line 45 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test windows (Elixir 1.14.x | Erlang/OTP 23.x)

variable "payload" is unused (if the variable is not meant to be used, prefix it with an underscore)

Check warning on line 45 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test windows (Elixir 1.13.x | Erlang/OTP 23.x)

variable "payload" is unused (if the variable is not meant to be used, prefix it with an underscore)

Check warning on line 45 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / static analysis (Elixir 1.15.x | Erlang/OTP 26.x)

variable "payload" is unused (if the variable is not meant to be used, prefix it with an underscore)

Check warning on line 45 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test windows (Elixir 1.15.x | Erlang/OTP 24.x)

variable "payload" is unused (if the variable is not meant to be used, prefix it with an underscore)

Check warning on line 45 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test windows (Elixir 1.15.x | Erlang/OTP 25.x)

variable "payload" is unused (if the variable is not meant to be used, prefix it with an underscore)

Check warning on line 45 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test windows (Elixir 1.13.x | Erlang/OTP 22.x)

variable "payload" is unused (if the variable is not meant to be used, prefix it with an underscore)

Check warning on line 45 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test windows (Elixir 1.15.x | Erlang/OTP 26.x)

variable "payload" is unused (if the variable is not meant to be used, prefix it with an underscore)
{payload, stacktrace} = Exception.blame(kind, error, __STACKTRACE__)

Check warning on line 46 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test (Elixir 1.14.x | Erlang/OTP 26.x)

variable "error" does not exist and is being expanded to "error()", please use parentheses to remove the ambiguity or change the variable name

Check warning on line 46 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test (Elixir 1.13.x | Erlang/OTP 24.x)

variable "error" does not exist and is being expanded to "error()", please use parentheses to remove the ambiguity or change the variable name

Check failure on line 46 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test (Elixir 1.14.x | Erlang/OTP 26.x)

** (CompileError) lib/elixir_sense/providers/suggestion/generic_reducer.ex:46: undefined function error/0 (expected ElixirSense.Providers.Suggestion.GenericReducer to define such a function or for it to be imported, but none are available)

Check failure on line 46 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test (Elixir 1.13.x | Erlang/OTP 24.x)

** (CompileError) lib/elixir_sense/providers/suggestion/generic_reducer.ex:46: undefined function error/0 (expected ElixirSense.Providers.Suggestion.GenericReducer to define such a function or for it to be imported, but none are available)

Check warning on line 46 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test (Elixir 1.14.x | Erlang/OTP 23.x)

variable "error" does not exist and is being expanded to "error()", please use parentheses to remove the ambiguity or change the variable name

Check failure on line 46 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test (Elixir 1.14.x | Erlang/OTP 23.x)

** (CompileError) lib/elixir_sense/providers/suggestion/generic_reducer.ex:46: undefined function error/0 (expected ElixirSense.Providers.Suggestion.GenericReducer to define such a function or for it to be imported, but none are available)

Check warning on line 46 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test (Elixir 1.13.x | Erlang/OTP 22.x)

variable "error" does not exist and is being expanded to "error()", please use parentheses to remove the ambiguity or change the variable name

Check failure on line 46 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test (Elixir 1.13.x | Erlang/OTP 22.x)

** (CompileError) lib/elixir_sense/providers/suggestion/generic_reducer.ex:46: undefined function error/0 (expected ElixirSense.Providers.Suggestion.GenericReducer to define such a function or for it to be imported, but none are available)

Check warning on line 46 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test (Elixir 1.14.x | Erlang/OTP 24.x)

variable "error" does not exist and is being expanded to "error()", please use parentheses to remove the ambiguity or change the variable name

Check failure on line 46 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test (Elixir 1.14.x | Erlang/OTP 24.x)

** (CompileError) lib/elixir_sense/providers/suggestion/generic_reducer.ex:46: undefined function error/0 (expected ElixirSense.Providers.Suggestion.GenericReducer to define such a function or for it to be imported, but none are available)

Check warning on line 46 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test (Elixir 1.13.x | Erlang/OTP 23.x)

variable "error" does not exist and is being expanded to "error()", please use parentheses to remove the ambiguity or change the variable name

Check failure on line 46 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test (Elixir 1.13.x | Erlang/OTP 23.x)

** (CompileError) lib/elixir_sense/providers/suggestion/generic_reducer.ex:46: undefined function error/0 (expected ElixirSense.Providers.Suggestion.GenericReducer to define such a function or for it to be imported, but none are available)

Check warning on line 46 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test (Elixir 1.14.x | Erlang/OTP 25.x)

variable "error" does not exist and is being expanded to "error()", please use parentheses to remove the ambiguity or change the variable name

Check warning on line 46 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test (Elixir 1.13.x | Erlang/OTP 25.x)

variable "error" does not exist and is being expanded to "error()", please use parentheses to remove the ambiguity or change the variable name

Check failure on line 46 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test (Elixir 1.14.x | Erlang/OTP 25.x)

** (CompileError) lib/elixir_sense/providers/suggestion/generic_reducer.ex:46: undefined function error/0 (expected ElixirSense.Providers.Suggestion.GenericReducer to define such a function or for it to be imported, but none are available)

Check failure on line 46 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test (Elixir 1.13.x | Erlang/OTP 25.x)

** (CompileError) lib/elixir_sense/providers/suggestion/generic_reducer.ex:46: undefined function error/0 (expected ElixirSense.Providers.Suggestion.GenericReducer to define such a function or for it to be imported, but none are available)

Check warning on line 46 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test windows (Elixir 1.14.x | Erlang/OTP 25.x)

variable "error" does not exist and is being expanded to "error()", please use parentheses to remove the ambiguity or change the variable name

Check failure on line 46 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test windows (Elixir 1.14.x | Erlang/OTP 25.x)

** (CompileError) lib/elixir_sense/providers/suggestion/generic_reducer.ex:46: undefined function error/0 (expected ElixirSense.Providers.Suggestion.GenericReducer to define such a function or for it to be imported, but none are available)

Check warning on line 46 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test windows (Elixir 1.14.x | Erlang/OTP 26.x)

variable "error" does not exist and is being expanded to "error()", please use parentheses to remove the ambiguity or change the variable name

Check failure on line 46 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test windows (Elixir 1.14.x | Erlang/OTP 26.x)

** (CompileError) lib/elixir_sense/providers/suggestion/generic_reducer.ex:46: undefined function error/0 (expected ElixirSense.Providers.Suggestion.GenericReducer to define such a function or for it to be imported, but none are available)

Check warning on line 46 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test windows (Elixir 1.13.x | Erlang/OTP 24.x)

variable "error" does not exist and is being expanded to "error()", please use parentheses to remove the ambiguity or change the variable name

Check failure on line 46 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test windows (Elixir 1.13.x | Erlang/OTP 24.x)

** (CompileError) lib/elixir_sense/providers/suggestion/generic_reducer.ex:46: undefined function error/0 (expected ElixirSense.Providers.Suggestion.GenericReducer to define such a function or for it to be imported, but none are available)

Check warning on line 46 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test windows (Elixir 1.13.x | Erlang/OTP 25.x)

variable "error" does not exist and is being expanded to "error()", please use parentheses to remove the ambiguity or change the variable name

Check failure on line 46 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test windows (Elixir 1.13.x | Erlang/OTP 25.x)

** (CompileError) lib/elixir_sense/providers/suggestion/generic_reducer.ex:46: undefined function error/0 (expected ElixirSense.Providers.Suggestion.GenericReducer to define such a function or for it to be imported, but none are available)

Check warning on line 46 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test windows (Elixir 1.14.x | Erlang/OTP 24.x)

variable "error" does not exist and is being expanded to "error()", please use parentheses to remove the ambiguity or change the variable name

Check failure on line 46 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test windows (Elixir 1.14.x | Erlang/OTP 24.x)

** (CompileError) lib/elixir_sense/providers/suggestion/generic_reducer.ex:46: undefined function error/0 (expected ElixirSense.Providers.Suggestion.GenericReducer to define such a function or for it to be imported, but none are available)

Check warning on line 46 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test windows (Elixir 1.14.x | Erlang/OTP 23.x)

variable "error" does not exist and is being expanded to "error()", please use parentheses to remove the ambiguity or change the variable name

Check failure on line 46 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test windows (Elixir 1.14.x | Erlang/OTP 23.x)

** (CompileError) lib/elixir_sense/providers/suggestion/generic_reducer.ex:46: undefined function error/0 (expected ElixirSense.Providers.Suggestion.GenericReducer to define such a function or for it to be imported, but none are available)

Check warning on line 46 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test windows (Elixir 1.13.x | Erlang/OTP 23.x)

variable "error" does not exist and is being expanded to "error()", please use parentheses to remove the ambiguity or change the variable name

Check failure on line 46 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test windows (Elixir 1.13.x | Erlang/OTP 23.x)

** (CompileError) lib/elixir_sense/providers/suggestion/generic_reducer.ex:46: undefined function error/0 (expected ElixirSense.Providers.Suggestion.GenericReducer to define such a function or for it to be imported, but none are available)

Check warning on line 46 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test windows (Elixir 1.13.x | Erlang/OTP 22.x)

variable "error" does not exist and is being expanded to "error()", please use parentheses to remove the ambiguity or change the variable name

Check failure on line 46 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test windows (Elixir 1.13.x | Erlang/OTP 22.x)

** (CompileError) lib/elixir_sense/providers/suggestion/generic_reducer.ex:46: undefined function error/0 (expected ElixirSense.Providers.Suggestion.GenericReducer to define such a function or for it to be imported, but none are available)
message = Exception.format(kind, payload, stacktrace)
Logger.error("Error in suggestions reducer: #{message}")
{:cont, acc}
end
else
{:cont, acc}
end

[] ->
if function_exported?(reducer, :suggestions, 2) do
reducer.suggestions(hint, opts) |> handle_suggestions(acc)
try do
reducer.suggestions(hint, opts) |> handle_suggestions(acc)
catch
kind, payload ->

Check warning on line 60 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test (Elixir 1.14.x | Erlang/OTP 26.x)

variable "payload" is unused (if the variable is not meant to be used, prefix it with an underscore)

Check warning on line 60 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test (Elixir 1.13.x | Erlang/OTP 24.x)

variable "payload" is unused (if the variable is not meant to be used, prefix it with an underscore)

Check warning on line 60 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test (Elixir 1.14.x | Erlang/OTP 23.x)

variable "payload" is unused (if the variable is not meant to be used, prefix it with an underscore)

Check warning on line 60 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test (Elixir 1.15.x | Erlang/OTP 26.x)

variable "payload" is unused (if the variable is not meant to be used, prefix it with an underscore)

Check warning on line 60 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test (Elixir 1.13.x | Erlang/OTP 22.x)

variable "payload" is unused (if the variable is not meant to be used, prefix it with an underscore)

Check warning on line 60 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test (Elixir 1.15.x | Erlang/OTP 25.x)

variable "payload" is unused (if the variable is not meant to be used, prefix it with an underscore)

Check warning on line 60 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test (Elixir 1.14.x | Erlang/OTP 24.x)

variable "payload" is unused (if the variable is not meant to be used, prefix it with an underscore)

Check warning on line 60 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test (Elixir 1.15.x | Erlang/OTP 24.x)

variable "payload" is unused (if the variable is not meant to be used, prefix it with an underscore)

Check warning on line 60 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test (Elixir 1.13.x | Erlang/OTP 23.x)

variable "payload" is unused (if the variable is not meant to be used, prefix it with an underscore)

Check warning on line 60 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test (Elixir 1.14.x | Erlang/OTP 25.x)

variable "payload" is unused (if the variable is not meant to be used, prefix it with an underscore)

Check warning on line 60 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test (Elixir 1.13.x | Erlang/OTP 25.x)

variable "payload" is unused (if the variable is not meant to be used, prefix it with an underscore)

Check warning on line 60 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test windows (Elixir 1.14.x | Erlang/OTP 25.x)

variable "payload" is unused (if the variable is not meant to be used, prefix it with an underscore)

Check warning on line 60 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test windows (Elixir 1.14.x | Erlang/OTP 26.x)

variable "payload" is unused (if the variable is not meant to be used, prefix it with an underscore)

Check warning on line 60 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test windows (Elixir 1.13.x | Erlang/OTP 24.x)

variable "payload" is unused (if the variable is not meant to be used, prefix it with an underscore)

Check warning on line 60 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test windows (Elixir 1.13.x | Erlang/OTP 25.x)

variable "payload" is unused (if the variable is not meant to be used, prefix it with an underscore)

Check warning on line 60 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test windows (Elixir 1.14.x | Erlang/OTP 24.x)

variable "payload" is unused (if the variable is not meant to be used, prefix it with an underscore)

Check warning on line 60 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test windows (Elixir 1.14.x | Erlang/OTP 23.x)

variable "payload" is unused (if the variable is not meant to be used, prefix it with an underscore)

Check warning on line 60 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test windows (Elixir 1.13.x | Erlang/OTP 23.x)

variable "payload" is unused (if the variable is not meant to be used, prefix it with an underscore)

Check warning on line 60 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / static analysis (Elixir 1.15.x | Erlang/OTP 26.x)

variable "payload" is unused (if the variable is not meant to be used, prefix it with an underscore)

Check warning on line 60 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test windows (Elixir 1.15.x | Erlang/OTP 24.x)

variable "payload" is unused (if the variable is not meant to be used, prefix it with an underscore)

Check warning on line 60 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test windows (Elixir 1.15.x | Erlang/OTP 25.x)

variable "payload" is unused (if the variable is not meant to be used, prefix it with an underscore)

Check warning on line 60 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test windows (Elixir 1.13.x | Erlang/OTP 22.x)

variable "payload" is unused (if the variable is not meant to be used, prefix it with an underscore)

Check warning on line 60 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test windows (Elixir 1.15.x | Erlang/OTP 26.x)

variable "payload" is unused (if the variable is not meant to be used, prefix it with an underscore)
{payload, stacktrace} = Exception.blame(kind, error, __STACKTRACE__)

Check warning on line 61 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test (Elixir 1.14.x | Erlang/OTP 26.x)

variable "error" does not exist and is being expanded to "error()", please use parentheses to remove the ambiguity or change the variable name

Check warning on line 61 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test (Elixir 1.14.x | Erlang/OTP 26.x)

undefined function error/0 (expected ElixirSense.Providers.Suggestion.GenericReducer to define such a function or for it to be imported, but none are available)

Check warning on line 61 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test (Elixir 1.13.x | Erlang/OTP 24.x)

variable "error" does not exist and is being expanded to "error()", please use parentheses to remove the ambiguity or change the variable name

Check warning on line 61 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test (Elixir 1.13.x | Erlang/OTP 24.x)

undefined function error/0 (expected ElixirSense.Providers.Suggestion.GenericReducer to define such a function or for it to be imported, but none are available)

Check warning on line 61 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test (Elixir 1.14.x | Erlang/OTP 23.x)

variable "error" does not exist and is being expanded to "error()", please use parentheses to remove the ambiguity or change the variable name

Check warning on line 61 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test (Elixir 1.14.x | Erlang/OTP 23.x)

undefined function error/0 (expected ElixirSense.Providers.Suggestion.GenericReducer to define such a function or for it to be imported, but none are available)

Check warning on line 61 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test (Elixir 1.13.x | Erlang/OTP 22.x)

variable "error" does not exist and is being expanded to "error()", please use parentheses to remove the ambiguity or change the variable name

Check warning on line 61 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test (Elixir 1.13.x | Erlang/OTP 22.x)

undefined function error/0 (expected ElixirSense.Providers.Suggestion.GenericReducer to define such a function or for it to be imported, but none are available)

Check warning on line 61 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test (Elixir 1.14.x | Erlang/OTP 24.x)

variable "error" does not exist and is being expanded to "error()", please use parentheses to remove the ambiguity or change the variable name

Check warning on line 61 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test (Elixir 1.14.x | Erlang/OTP 24.x)

undefined function error/0 (expected ElixirSense.Providers.Suggestion.GenericReducer to define such a function or for it to be imported, but none are available)

Check warning on line 61 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test (Elixir 1.13.x | Erlang/OTP 23.x)

variable "error" does not exist and is being expanded to "error()", please use parentheses to remove the ambiguity or change the variable name

Check warning on line 61 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test (Elixir 1.13.x | Erlang/OTP 23.x)

undefined function error/0 (expected ElixirSense.Providers.Suggestion.GenericReducer to define such a function or for it to be imported, but none are available)

Check warning on line 61 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test (Elixir 1.14.x | Erlang/OTP 25.x)

variable "error" does not exist and is being expanded to "error()", please use parentheses to remove the ambiguity or change the variable name

Check warning on line 61 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test (Elixir 1.14.x | Erlang/OTP 25.x)

undefined function error/0 (expected ElixirSense.Providers.Suggestion.GenericReducer to define such a function or for it to be imported, but none are available)

Check warning on line 61 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test (Elixir 1.13.x | Erlang/OTP 25.x)

variable "error" does not exist and is being expanded to "error()", please use parentheses to remove the ambiguity or change the variable name

Check warning on line 61 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test (Elixir 1.13.x | Erlang/OTP 25.x)

undefined function error/0 (expected ElixirSense.Providers.Suggestion.GenericReducer to define such a function or for it to be imported, but none are available)

Check warning on line 61 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test windows (Elixir 1.14.x | Erlang/OTP 25.x)

variable "error" does not exist and is being expanded to "error()", please use parentheses to remove the ambiguity or change the variable name

Check warning on line 61 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test windows (Elixir 1.14.x | Erlang/OTP 25.x)

undefined function error/0 (expected ElixirSense.Providers.Suggestion.GenericReducer to define such a function or for it to be imported, but none are available)

Check warning on line 61 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test windows (Elixir 1.14.x | Erlang/OTP 26.x)

variable "error" does not exist and is being expanded to "error()", please use parentheses to remove the ambiguity or change the variable name

Check warning on line 61 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test windows (Elixir 1.14.x | Erlang/OTP 26.x)

undefined function error/0 (expected ElixirSense.Providers.Suggestion.GenericReducer to define such a function or for it to be imported, but none are available)

Check warning on line 61 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test windows (Elixir 1.13.x | Erlang/OTP 24.x)

variable "error" does not exist and is being expanded to "error()", please use parentheses to remove the ambiguity or change the variable name

Check warning on line 61 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test windows (Elixir 1.13.x | Erlang/OTP 24.x)

undefined function error/0 (expected ElixirSense.Providers.Suggestion.GenericReducer to define such a function or for it to be imported, but none are available)

Check warning on line 61 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test windows (Elixir 1.13.x | Erlang/OTP 25.x)

variable "error" does not exist and is being expanded to "error()", please use parentheses to remove the ambiguity or change the variable name

Check warning on line 61 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test windows (Elixir 1.13.x | Erlang/OTP 25.x)

undefined function error/0 (expected ElixirSense.Providers.Suggestion.GenericReducer to define such a function or for it to be imported, but none are available)

Check warning on line 61 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test windows (Elixir 1.14.x | Erlang/OTP 24.x)

variable "error" does not exist and is being expanded to "error()", please use parentheses to remove the ambiguity or change the variable name

Check warning on line 61 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test windows (Elixir 1.14.x | Erlang/OTP 24.x)

undefined function error/0 (expected ElixirSense.Providers.Suggestion.GenericReducer to define such a function or for it to be imported, but none are available)

Check warning on line 61 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test windows (Elixir 1.14.x | Erlang/OTP 23.x)

variable "error" does not exist and is being expanded to "error()", please use parentheses to remove the ambiguity or change the variable name

Check warning on line 61 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test windows (Elixir 1.14.x | Erlang/OTP 23.x)

undefined function error/0 (expected ElixirSense.Providers.Suggestion.GenericReducer to define such a function or for it to be imported, but none are available)

Check warning on line 61 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test windows (Elixir 1.13.x | Erlang/OTP 23.x)

variable "error" does not exist and is being expanded to "error()", please use parentheses to remove the ambiguity or change the variable name

Check warning on line 61 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test windows (Elixir 1.13.x | Erlang/OTP 23.x)

undefined function error/0 (expected ElixirSense.Providers.Suggestion.GenericReducer to define such a function or for it to be imported, but none are available)

Check warning on line 61 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test windows (Elixir 1.13.x | Erlang/OTP 22.x)

variable "error" does not exist and is being expanded to "error()", please use parentheses to remove the ambiguity or change the variable name

Check warning on line 61 in lib/elixir_sense/providers/suggestion/generic_reducer.ex

View workflow job for this annotation

GitHub Actions / mix test windows (Elixir 1.13.x | Erlang/OTP 22.x)

undefined function error/0 (expected ElixirSense.Providers.Suggestion.GenericReducer to define such a function or for it to be imported, but none are available)
message = Exception.format(kind, payload, stacktrace)
Logger.error("Error in suggestions reducer: #{message}")
{:cont, acc}
end
else
{:cont, acc}
end
Expand Down

0 comments on commit 4890a2e

Please sign in to comment.