Closed erszcz closed 3 months ago
Whoops, I got distracted realizing I don't actually know how throw
/catch
work and then I saw something shiny and forgot about this.
Specifically I'm confused by the fact that these two print the same value (%{catch: :this}
):
:throw, thrown ->
dbg(thrown)
thrown ->
dbg(thrown)
Obviously yours is more specific, which I think is what we want here. I was just thrown off by that.
Yeah, throw
is really seldom used in Elixir. Thanks again for taking the time to look at this!
One more fix to also catch
throw
s and stringify the thrown values or exit reasons. I think it's bulletproof now 🤞