Skip Menu |

This queue is for tickets about the Log-Report CPAN distribution.

Report information
The Basics
Id: 92970
Status: resolved
Priority: 0/
Queue: Log-Report

People
Owner: Nobody in particular
Requestors: l.mai [...] web.de
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.01
Fixed in: (no value)



Subject: Log::Report::Exception overloading doesn't fallback
I've hit a case where a Log::Report::Exception was raised within the context of a DBIx::Class txn_do() call. The application in question doesn't use the latest version of DBIx::Class, so this results in the rather unhelpful error message: DBIx::Class::Schema::txn_do(): Operation "ne": no method found, left argument in overloaded package Log::Report::Dispatcher::Try, right argument has no overloaded magic at /usr/lib64/perl5/vendor_perl/5.12.4/DBIx/Class/Storage/TxnScopeGuard.pm line 22. This is triggered by the line "if (defined $@ and $@ ne '')" in DBIx::Class::Storage::TxnScopeGuard. Newer versions of DBIx::Class do this: https://metacpan.org/source/RIBASUSHI/DBIx-Class-0.08270/lib/DBIx/Class/_Util.pm#L83 i.e. it prints a warning and recommends that the exception class 'use overload fallback => 1;' in order to make exception handling more sane. Could you change use overload '""' => 'toString'; to use overload '""' => 'toString', fallback => 1; ?
Subject: Re: [rt.cpan.org #92970] Log::Report::Exception overloading doesn't fallback
Date: Wed, 12 Feb 2014 21:33:38 +0100
To: Lukas Mai via RT <bug-Log-Report [...] rt.cpan.org>
From: Mark Overmeer <mark [...] overmeer.net>
* Lukas Mai via RT (bug-Log-Report@rt.cpan.org) [140212 18:12]: Show quoted text
> Wed Feb 12 13:12:39 2014: Request 92970 was acted upon. > Transaction: Ticket created by l.mai@web.de > Queue: Log-Report > Subject: Log::Report::Exception overloading doesn't fallback > > Could you change > use overload '""' => 'toString'; > to use overload '""' => 'toString', fallback => 1;
Accepted, good catch. Also added to overloaded ::Dispatcher. -- Thanks, MarkOv ------------------------------------------------------------------------ Mark Overmeer MSc MARKOV Solutions Mark@Overmeer.net solutions@overmeer.net http://Mark.Overmeer.net http://solutions.overmeer.net
fixed in 1.02