Skip to content

Commit

Permalink
fix: decode spec-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
avilagaston9 committed Apr 24, 2024
1 parent ac80861 commit f6e1992
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/ssz_ex/error.ex
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ defmodule SszEx.Error do
def format(%Error{message: message, stacktrace: []}), do: "#{message}"

def format(%Error{message: message, stacktrace: stacktrace}) do
"#{message}"
formatted_stacktrace = stacktrace |> Enum.join(".")
"#{message}Stacktrace: #{formatted_stacktrace}"
end
Expand All @@ -22,6 +21,8 @@ defmodule SszEx.Error do
%Error{message: message, stacktrace: [new_trace | stacktrace]}
end

def add_container(%Error{} = error, :bool), do: error

def add_container(%Error{message: message, stacktrace: stacktrace}, value)
when is_atom(value) do
new_trace =
Expand Down

0 comments on commit f6e1992

Please sign in to comment.