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

Better definition of async exceptions #53

Merged
merged 1 commit into from May 7, 2018

Conversation

snoyberg
Copy link
Contributor

@snoyberg snoyberg commented May 7, 2018

syncIO previously relied upon the unexceptionalio package, which does
not use the standard definition from base of an asynchronous exception.
This brings errors in line with other libraries in the ecosystem for
recovering from all exceptions.

syncIO previously relied upon the unexceptionalio package, which does
not use the standard definition from base of an asynchronous exception.
This brings errors in line with other libraries in the ecosystem for
recovering from all exceptions.
@Gabriella439
Copy link
Owner

I assume this is related to the discussion in singpolyma/unexceptionalio#9

I think this is a good change because it matches the stated contract of syncIO to ignore asynchronous exceptions. However, I'd like to preserve the old behavior under a function of a new name (i.e. unexceptionalIO or whatever), since I think it's useful to have a function which tries to squeeze as many exceptions out of IO as possible

@snoyberg
Copy link
Contributor Author

snoyberg commented May 7, 2018

The function you're describing would "squeeze" less exception types out of IO, not more. And any function that squeezes more types out of IO would allow recovering from an async exception, which would be broken behavior.

@Gabriella439
Copy link
Owner

Oh, weird. For some reason I thought that Unexceptional.fromIO just did a catch all on SomeException. Never mind, then. This is fine as is

@Gabriella439 Gabriella439 merged commit 36ae3e4 into Gabriella439:master May 7, 2018
@Gabriella439
Copy link
Owner

I'll wait three days before uploading to Hackage, just in case @singpolyma has any proposed changes

@snoyberg
Copy link
Contributor Author

snoyberg commented May 7, 2018

Awesome, thanks!

@Gabriella439
Copy link
Owner

You're welcome!

@singpolyma
Copy link

It's your package, of course. I'll just have to move the wrappers into my package or a new package for users who want what unexceptional offers.

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.

None yet

3 participants