Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Catch throws, stringify thrown values and exit reasons for reporting #149

Merged
merged 1 commit into from
Jul 12, 2024

Conversation

erszcz
Copy link
Contributor

@erszcz erszcz commented Jul 4, 2024

One more fix to also catch throws and stringify the thrown values or exit reasons. I think it's bulletproof now 🤞

@erszcz erszcz force-pushed the catch-throws-and-stringify-reasons branch from 8f74a7b to 82f094d Compare July 4, 2024 10:22
@marcdel
Copy link
Owner

marcdel commented Jul 12, 2024

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.

@marcdel marcdel merged commit e29ddfa into marcdel:main Jul 12, 2024
1 check passed
@erszcz
Copy link
Contributor Author

erszcz commented Jul 15, 2024

Yeah, throw is really seldom used in Elixir. Thanks again for taking the time to look at this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants