Current section

Files

Jump to
ex_dgraph lib exdgraph error.ex
Raw

lib/exdgraph/error.ex

defmodule ExDgraph.Error do
@moduledoc """
Dgraph or connection error are wrapped in ExDgraph.Error.
"""
defexception [:reason, :action]
@type t :: %ExDgraph.Error{}
@impl true
def message(%{action: action, reason: reason}) do
"#{action} failed with #{inspect(reason)}"
end
end