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

Panics inside fetch are not recovered #31

Open
edsrzf opened this issue Jul 1, 2019 · 1 comment · May be fixed by #39
Open

Panics inside fetch are not recovered #31

edsrzf opened this issue Jul 1, 2019 · 1 comment · May be fixed by #39

Comments

@edsrzf
Copy link
Contributor

edsrzf commented Jul 1, 2019

Panics that happen in the fetch function are not recovered, which means that a panic takes down the entire process. This could be something that I handle myself in every fetch function, but it seems like something that the generated code should handle.

I can think of a few approaches:

  • Always recover from panics in the template.
  • Allow specifying whether or not to recover from panics at code generation time.
  • Allow specifying a panic handler function in the loader's config object.

I think I'd lean toward the first, but thought I'd start a discussion. I'm happy to open a pull request once we decide on an approach.

@gracenoah
Copy link

I think option 3 will be necessary. We care very much about how errors are constructed and reported in our code base and generally library provided panic handlers hide a lot of information.

@edsrzf edsrzf linked a pull request Aug 11, 2019 that will close this issue
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 a pull request may close this issue.

2 participants