Commit 35fea206 authored by Leigh B Stoller's avatar Leigh B Stoller
Browse files

Add stack backtrace to DBError() email message to tbops.

parent 983ddd06
#!/usr/bin/perl -w
#
# EMULAB-COPYRIGHT
# Copyright (c) 2008-2010 University of Utah and the Flux Group.
# Copyright (c) 2008-2011 University of Utah and the Flux Group.
# All rights reserved.
#
package emdb;
use strict;
use File::Basename;
use English;
use Carp;
use Exporter;
use vars qw(@ISA @EXPORT);
@ISA = "Exporter";
......@@ -66,7 +67,8 @@ sub DBError($$;$)
if (! defined($nomail)) {
libtestbed::SENDMAIL($TBOPS, "DBError - $message",
"$message - In $SCRIPTNAME\n".
"$emdbi::DBErrorString\n");
"$emdbi::DBErrorString\n" .
Carp::longmess() . "\n");
}
$f->({cause=>'software'}, "$message:\n$emdbi::DBErrorString");
......
#!/usr/bin/perl -w
#
# EMULAB-COPYRIGHT
# Copyright (c) 2008-2010 University of Utah and the Flux Group.
# Copyright (c) 2008-2011 University of Utah and the Flux Group.
# All rights reserved.
#
package emdbi;
......@@ -9,6 +9,7 @@ use strict;
use File::Basename;
use Mysql;
use English;
use Carp;
use Exporter;
use vars qw(@ISA @EXPORT);
@ISA = "Exporter";
......@@ -393,6 +394,8 @@ sub DBError($$;$)
print MAIL "In $SCRIPTNAME\n\n";
print MAIL "$message\n\n";
print MAIL "$DBErrorString\n\n";
print MAIL Carp::longmess();
print MAIL "\n";
close(MAIL);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment