From 81a331a3eaf81352b0f06a7b91f9ced73be04741 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Wed, 28 Sep 2005 15:26:44 +0000 Subject: 21779 plus unposted catch change: exception improvementss --- Functions/Exceptions/throw | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Functions/Exceptions/throw') diff --git a/Functions/Exceptions/throw b/Functions/Exceptions/throw index a5478fb9c..5c7326999 100644 --- a/Functions/Exceptions/throw +++ b/Functions/Exceptions/throw @@ -19,11 +19,12 @@ # script. # The following must not be local. -EXCEPTION="$1" +typeset -g EXCEPTION="$1" +readonly THROW if (( TRY_BLOCK_ERROR == 0 )); then # We are throwing an exception from the middle of an always-block. # We can do this by restoring the error status from the try-block. (( TRY_BLOCK_ERROR = 1 )) fi # Raise an error, but don't show an error message. -{ ${:?THROW} } 2>/dev/null +THROW= 2>/dev/null -- cgit v1.2.3