ex_ray icon indicating copy to clipboard operation
ex_ray copied to clipboard

Using raise instead, throw wraps the error

Open sashman opened this issue 6 years ago • 0 comments

Using throw does not reflect the original error being generated. For example:

With throw in gen_body/3 pre you get:

** (throw) %Ecto.NoResultsError{message: "expected at least one result but got none in query:\n\nfrom u in MyApp.User,\n  where: u.id == ^550\n"}

But with raise I get:

     ** (Ecto.NoResultsError) expected at least one result but got none in query:
     
     from u in MyApp.User,
       where: u.id == ^546

sashman avatar Feb 15 '18 08:02 sashman