Author: tene
Date: Mon Nov 24 14:59:06 2008
New Revision: 33164

Modified:
   trunk/docs/pdds/pdd23_exceptions.pod

Log:
Add missing documentation about resuming from exceptions.
jonathan++ for reporting this.

Modified: trunk/docs/pdds/pdd23_exceptions.pod
==============================================================================
--- trunk/docs/pdds/pdd23_exceptions.pod        (original)
+++ trunk/docs/pdds/pdd23_exceptions.pod        Mon Nov 24 14:59:06 2008
@@ -365,10 +365,20 @@
 exception. Other exceptions at the run-loop level are also generally
 resumable.
 
-  $P0 = new 'String'
-  $P0 = "something bad happened"
-  $P1 = new 'Exception', $P0   # create new exception object
-  throw $P1                      # throw it
+You resume from an exception by invoking the return continuation stored
+in the 'resume' field of the exception.
+
+  push_eh handler
+  $P0 = new 'Exception'          # create new exception object
+  throw $P0                      # throw it
+  pop_eh
+  say "Everything is just fine."
+  .return()
+ handler:
+  .local pmc exception, continuation
+  .get_results (exception)
+  continuation = exception['resume']
+  continuation()
 
 =head1 ATTACHMENTS
 

Reply via email to