in reply to Re: Dancer2::Plugin::Database and database errors (hook database_error)
in thread Dancer2::Plugin::Database and database errors
Yes, I tried using the database_error hook. Here's the code:
hook 'database_error' => sub { my $errstr = shift; my $dbh = shift; var errstr => $errstr; };
I would then check for errstr, but it was never set. I checked three ways: 1) the way I showed here (which still is in the code), 2) by issuing a debug() call, and 3) having it die "some msg." None of them triggered. So it is as if the error is in the plugin, not in the database.
I was going to try to debug it further to put in a but report, but, frankly, I built a workaround. I have two teams at work waiting for this to be working, so I didn't have the luxury of time.
You also asked if I tried the debug; no I didn't. I should, and perhaps when the pressure is off and I can go through the code a little more to clean it up, I will -- I bookmarked this thread just in case suggestions like yours helped.
Thanks for your help.
David Lee Crites, Author and DevOps Dude
Devops: lee@critesclan.com
Author: davidlee@adoniah.co
quad alii ut vivere
|
|---|