package DB::DBException; use base qw(Error); sub new { my ($self, $msg) = @_; my @args = (); local $Error::Depth = $Error::Depth + 1; local $Error::Debug = 1; # Enables storing of stacktrace $self->SUPER::new(-text => $msg, @args); return $self; }