Ah, my misunderstanding. Thank you! Great gem, by the way.

On Thursday, August 18, 2016 at 3:38:15 PM UTC-4, Jeremy Evans wrote:
>
> On Thursday, August 18, 2016 at 11:13:18 AM UTC-7, James Parker wrote:
>>
>> Hey Jeremy,
>>
>> The changes around 4.36.0 added the error handling to that begin block, 
>> but if you look at the stack trace, the yield throwing the error is 
>> happening outside of the protected block. I think that first (unprotected) 
>> yield call needs to be moved into the protected block. Am I missing 
>> something?
>>
>
> Your backtrace shows that #escape is raising the error.
>
> In 4.36.0, Sequel uses begin/rescue inside the synchronize block to 
> reraise the error as a Sequel::DatabaseDisconnectError (
> https://github.com/jeremyevans/sequel/blob/4.36.0/lib/sequel/adapters/mysql2.rb#L202-L210
> ).
>
> In 4.37.0, Sequel has the connection pool recognize disconnect errors not 
> specifically raised as Sequel::DatabaseDisconnectError, removing such 
> connections from the pool.  So the mysql2 adapter code is more similar to 
> the <4.36.0 adapter code (
> https://github.com/jeremyevans/sequel/blob/4.37.0/lib/sequel/adapters/mysql2.rb#L302),
>  
> but Sequel now handles this issue at a higher level of abstraction.
>
> If you think this is still a problem in 4.37.0, please submit a self 
> contained example or backtrace showing the problem.
>
> Thanks,
> Jeremy
>

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/d/optout.

Reply via email to