confess() rather than die() here.

We  really want to know the context of what happened when it dies here.
This commit is contained in:
Bradley M. Kuhn 2015-12-20 16:52:49 -08:00
parent 6de0eb64a2
commit a1f00e68a0

View file

@ -29,6 +29,7 @@ our $VERSION = '0.02';
use Scalar::Util qw(looks_like_number blessed); use Scalar::Util qw(looks_like_number blessed);
use Mail::RFC822::Address; use Mail::RFC822::Address;
use Carp qw(confess);
###################################################################### ######################################################################
@ -70,7 +71,7 @@ sub new ($$) {
$dbh->{RaiseError} = 0; $dbh->{RaiseError} = 0;
$dbh->{HandleError} = sub { $dbh->{HandleError} = sub {
$self->{__NESTED_TRANSACTION_COUNTER__} = 0; $self->{__NESTED_TRANSACTION_COUNTER__} = 0;
die $_[0]; confess $_[0];
}; };
$self->{__NESTED_TRANSACTION_COUNTER__} = 0; $self->{__NESTED_TRANSACTION_COUNTER__} = 0;
return $self; return $self;