Leon P Smith
Leon P Smith
Yeah, I'd expect it to print "Timed out." as well. It certainly seems like a bug to me.
Ok, so the issue is kinda obvious once I think about it: the async exception from `timeout` is causing the execution of `query_` to be abandoned, then the `onException` handler...
Well, I don't think ignoring exceptions from the rollback attempt is _that_ dangerous, after all, the only reason why postgresql-simple is trying to rollback is because there's an exception. So...
As an aside, my rule of thumb is that most resources that could have possibly been touched by a block of code that has been `System.timeout`-ed should be treated as...
@Chratho You don't happen to be using `withTransaction` in the presence of async exceptions? I am curious if this fixes your problem.
@nh2, I find your argument convincing. There are a few minor things you aren't appreciating, but I doubt they change the overall conclusion of your argument. First, postgresql-simple largely bypasses...
Sounds fine to me. (Sorry for the delay)
Yes, you have identified one of my dissatisfactions with the current API, but I haven't thought that much about it.
There's already some support for that in the `Errors` module. You might find the discussion in #22 and #23 informative.
That sounds like a reasonable suggestion, Cinnamon. Thank you. Also, functions in the Errors module are particularly simple, so it really shouldn't be difficult to write one of your own....