about summary refs log tree commit diff
path: root/Functions/Exceptions/catch
diff options
context:
space:
mode:
Diffstat (limited to 'Functions/Exceptions/catch')
-rw-r--r--Functions/Exceptions/catch2
1 files changed, 1 insertions, 1 deletions
diff --git a/Functions/Exceptions/catch b/Functions/Exceptions/catch
index 5f3876228..6afd664da 100644
--- a/Functions/Exceptions/catch
+++ b/Functions/Exceptions/catch
@@ -28,7 +28,7 @@
 function catch {
   if [[ $TRY_BLOCK_ERROR -gt 0 && $EXCEPTION = ${~1} ]]; then
     (( TRY_BLOCK_ERROR = 0 ))
-    CAUGHT="$EXCEPTION"
+    typeset -g CAUGHT="$EXCEPTION"
     unset EXCEPTION
     return 0
   fi