[Catalyst] Debugging in Catalyst
Joe Landman
landman at scalableinformatics.com
Thu Jan 5 18:16:03 CET 2006
Great! I will work on this soon.
Matt S Trout wrote:
> On Thu, Jan 05, 2006 at 11:33:25AM -0500, Joe Landman wrote:
>
>>Another (related) question. While digging around in the internals of
>>DBIx::Class::* I noted that all of the DBI stuff is done without the
>>eval safety net. I mention this as I had some errors that were really
>>hard to catch. I have personally been using the eval { $sth = DBI->()}
>>bit on all DBI for a while now (several years) in large part due to the
>>tendency of DBI to toss exceptions if you look at it cross-eyed why it
>>is crunching. I look at ?@ and return it to the caller in an anonymous
>>hash. This has made debugging so much easier for me. The
>>DBIx::SimplePerl is an example of this. When something dies, you can
>>find out exactly what the DBI/DBD layer thought was a valid reason for
>>dieing.
>
>
> My experience with DBI is that it doesn't throw exceptions unless you add
> RaiseError to your DBI options; if you look in Storage/DBI.pm you'll find
> that pretty much everything runs through 'sub _execute' if it's doing
> DBI works; I'd certainly be willing to consider a patch that checks the
> $rv and throws a suitable exception if there's an error - and wrapping that
> in an eval cage so exceptions can be re-thrown with extra debugging info would
> also be very welcome.
>
--
Joseph Landman, Ph.D
Founder and CEO
Scalable Informatics LLC,
email: landman at scalableinformatics.com
web : http://www.scalableinformatics.com
phone: +1 734 786 8423
fax : +1 734 786 8452
cell : +1 734 612 4615
More information about the Catalyst
mailing list