[Dbix-class] DBIx::Class::Exceptions

Toby Corkindale toby at dryft.net
Tue Nov 6 13:17:24 GMT 2012


Thanks -- have had a public holiday here and was out getting soaked on
a bike a lot, but will look at the branch shortly and get back to you.

On 5 November 2012 20:19, Peter Rabbitson <rabbit+dbic at rabbit.us> wrote:
> On Fri, Nov 02, 2012 at 03:41:48PM +1100, Toby Corkindale wrote:
>> Hi,
>> It used to be the case (some versions ago) that if you died with an object
>> inside a txn_do() then the re-thrown error would still contain that object.
>>
>> However now it seems to be stringified on the way out.
>>
>> To give an example, I'm sure I used to be able to do this:
>>
>> try {
>>   $schema->txn_do(sub {
>>       die Custom::Exception->new(msg => "foobar");
>>   });
>> }
>> catch {
>>   $_->custom_exception_method;
>> };
>>
>> Is there any way to get back to that behaviour?
>
> This particular behavior is still there. I pushed a branch demonstrating
> it[1]. There are however improvements in the pipelines for this
> codepath. In any case - can you look at the branch in question and point
> out which part doesn't work as you expect?
>
>
> Cheers
>
> [1] http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=dbsrgits/DBIx-Class.git;a=commitdiff;h=f69038482b
>
> _______________________________________________
> List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
> IRC: irc.perl.org#dbix-class
> SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
> Searchable Archive: http://www.grokbase.com/group/dbix-class@lists.scsys.co.uk



-- 
Turning and turning in the widening gyre
The falcon cannot hear the falconer
Things fall apart; the center cannot hold
Mere anarchy is loosed upon the world



More information about the DBIx-Class mailing list