Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
emulab-devel
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
143
Issues
143
List
Boards
Labels
Service Desk
Milestones
Merge Requests
6
Merge Requests
6
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
emulab
emulab-devel
Commits
b4bcdfa0
Commit
b4bcdfa0
authored
Oct 07, 2011
by
Leigh B Stoller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add BackTraceOnWarning($onoff) to produce a backtrace on all warnings.
parent
bbe51e15
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
1 deletion
+17
-1
db/emutil.pm.in
db/emutil.pm.in
+17
-1
No files found.
db/emutil.pm.in
View file @
b4bcdfa0
...
...
@@ -15,10 +15,11 @@ use vars qw(@ISA @EXPORT);
@
EXPORT
=
qw
(
TBDB_CHECKDBSLOT_NOFLAGS
TBDB_CHECKDBSLOT_WARN
TBDB_CHECKDBSLOT_ERROR
TBcheck_dbslot
TBFieldErrorString
TBGetUniqueIndex
ParRun
VersionInfo
UpdateVersionInfo
SpanningTree
);
SpanningTree
BackTraceOnWarning
);
use
emdb
;
use
English
;
use
Carp
;
#
#
Support
for
checking
field
values
against
what
is
specified
.
...
...
@@ -599,5 +600,20 @@ sub SpanningTree($)
return @newedges;
}
#
# Toggle backtrace on warning.
#
sub BackTraceOnWarning($)
{
my ($enable) = @_;
if ($enable) {
$SIG{__WARN__} = sub { Carp::cluck(@_); };
}
else {
$SIG{__WARN__} = '
DEFAULT
';
}
}
# _Always_ make sure that this 1 is at the end of the file...
1;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment