From 96d9b9cd40f1d98fda790eb12b5cdbeef8b48a81 Mon Sep 17 00:00:00 2001 From: Zefram Date: Tue, 20 Apr 2010 21:32:53 +0100 Subject: make die reliably hand error to post-eval code Put the exception into $@ last thing before longjmping to the op following the eval block, where previously it went into $@ before unwinding the stack. This change means that the exception is not liable to be lost by $@ being clobbered by destructors, cleanup code, or restoration after "local $@". The code running immediately after eval can now rely on $@ accurately indicating the exception status of the eval. --- MANIFEST | 1 + 1 file changed, 1 insertion(+) (limited to 'MANIFEST') diff --git a/MANIFEST b/MANIFEST index 5ca4f13aa0..6ae162687a 100644 --- a/MANIFEST +++ b/MANIFEST @@ -4386,6 +4386,7 @@ t/op/crypt.t See if crypt works t/op/dbm.t See if dbmopen/dbmclose work t/op/defins.t See if auto-insert of defined() works t/op/delete.t See if delete works +t/op/die_except.t See if die/eval avoids $@ clobberage t/op/die_exit.t See if die and exit status interaction works t/op/die.t See if die works t/op/dor.t See if defined-or (//) works -- cgit v1.2.1 From c5df3096702d4a814b3774dff243e7eb74814257 Mon Sep 17 00:00:00 2001 From: Zefram Date: Fri, 23 Apr 2010 01:52:47 +0100 Subject: SV-based interfaces for dieing and warning New functions croak_sv(), die_sv(), mess_sv(), and warn_sv(), each act much like their _sv-less counterparts, but take a single SV argument instead of sprintf-like format and args. They will accept RVs, passing them through as such. This means there's no more need to clobber ERRSV in order to throw a structured exception. pp_warn() and pp_die() are rewritten to use the _sv interfaces. This fixes part of [perl #74538]. It also means that a structured warning object will be passed through to $SIG{__WARN__} instead of being stringified, thus bringing warn in line with die with respect to structured exception objects. The new functions and their existing counterparts are all fully documented. --- MANIFEST | 1 + 1 file changed, 1 insertion(+) (limited to 'MANIFEST') diff --git a/MANIFEST b/MANIFEST index 6ae162687a..62e558760d 100644 --- a/MANIFEST +++ b/MANIFEST @@ -4513,6 +4513,7 @@ t/op/utftaint.t See if utf8 and taint work together t/op/vec.t See if vectors work t/op/ver.t See if v-strings and the %v format flag work t/op/wantarray.t See if wantarray works +t/op/warn.t See if warn works t/op/while_readdir.t See if while(readdir) works t/op/write.t See if write works (formats work) t/op/yadayada.t See if ... works -- cgit v1.2.1 From 7ce092845b50544ac127e66e60d73a2f7b707464 Mon Sep 17 00:00:00 2001 From: Zefram Date: Fri, 23 Apr 2010 02:22:54 +0100 Subject: bring G_KEEPERR back to the realm of sanity Makes the G_KEEPERR logic more consistent, and in particular make it sensibly handle non-string exceptions. An exception in a destructor is now always emitted as a warning, and never copied or merged into $@ of the surrounding context. No more clobbering exceptions being handled elsewhere, and no more double reporting. This fixes the rest of [perl #74538]. --- MANIFEST | 1 + 1 file changed, 1 insertion(+) (limited to 'MANIFEST') diff --git a/MANIFEST b/MANIFEST index 62e558760d..4b1781b55f 100644 --- a/MANIFEST +++ b/MANIFEST @@ -4388,6 +4388,7 @@ t/op/defins.t See if auto-insert of defined() works t/op/delete.t See if delete works t/op/die_except.t See if die/eval avoids $@ clobberage t/op/die_exit.t See if die and exit status interaction works +t/op/die_keeperr.t See if G_KEEPERR works for destructors t/op/die.t See if die works t/op/dor.t See if defined-or (//) works t/op/do.t See if subroutines work -- cgit v1.2.1