# New Ticket Created by  "Julian Fondren" 
# Please include the string:  [perl #41764]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=41764 >


Exception severity isn't documented at all, currently, but this
will at least help with a use-case that I've hit twice already.

Cheers,
Julian
=== docs/compiler_faq.pod
==================================================================
--- docs/compiler_faq.pod       (revision 17418)
+++ docs/compiler_faq.pod       (local)
@@ -453,10 +453,24 @@
 message.  More information is available inside the exception 'object' (TBD).
 
   handler:
-    get_results '(0,0') P0, S0      # PASM syntax
+    get_results '(0,0)' P0, S0      # PASM syntax
     print "Exception caught!\n"
     exit 1
 
+=head2 How do I let exceptions from C<exit> pass through my handler?
+
+Rethrow the exception if it has a severity of C<EXCEPT_EXIT>.
+
+  handler:
+    .include 'except_severity.pasm'
+    get_results '(0,0)' $P0, $S0
+    $I0 = $P0[2]
+    if $I0 == .EXCEPT_EXIT goto unexceptional
+    print "Exception caught!\n"
+    exit 1
+  unexceptional:
+    rethrow $P0
+
 =head2 How do I access the error message of an exception I've caught?
 
     push_eh handler

Reply via email to