summaryrefslogtreecommitdiff
path: root/Master/tlpkg/tlperl/lib/Test2/API/Context.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Master/tlpkg/tlperl/lib/Test2/API/Context.pm')
-rwxr-xr-xMaster/tlpkg/tlperl/lib/Test2/API/Context.pm8
1 files changed, 7 insertions, 1 deletions
diff --git a/Master/tlpkg/tlperl/lib/Test2/API/Context.pm b/Master/tlpkg/tlperl/lib/Test2/API/Context.pm
index 9cb1cfca723..177d9c40724 100755
--- a/Master/tlpkg/tlperl/lib/Test2/API/Context.pm
+++ b/Master/tlpkg/tlperl/lib/Test2/API/Context.pm
@@ -2,7 +2,7 @@ package Test2::API::Context;
use strict;
use warnings;
-our $VERSION = '1.302162';
+our $VERSION = '1.302175';
use Carp qw/confess croak/;
@@ -71,6 +71,8 @@ sub DESTROY {
# show the warning about using eq.
no warnings 'uninitialized';
if($self->{+EVAL_ERROR} eq $@ && $hub->is_local) {
+ require Carp;
+ my $mess = Carp::longmess("Context destroyed");
my $frame = $self->{+_IS_SPAWN} || $self->{+TRACE}->frame;
warn <<" EOT";
A context appears to have been destroyed without first calling release().
@@ -87,6 +89,10 @@ release():
Line: $frame->[2]
Tool: $frame->[3]
+Here is a trace to the code that caused the context to be destroyed, this could
+be an exit(), a goto, or simply the end of a scope:
+$mess
+
Cleaning up the CONTEXT stack...
EOT
}