[perl #47966] [DOCS] pdd23 doesn't list exception; death as a standard exception

Klaas-Jan Stol via RT parrotbug-followup at parrotcode.org
Sun Nov 30 13:51:37 UTC 2008


On Thu Nov 29 11:35:12 2007, pmichaud wrote:
> In the list of "Standard Parrot Exceptions" in pdd23, there's
> no item given for "exception;death"  even though it's mentioned
> as part of the "die" opcode earlier in the text.
> 
> The same is true for the "exception;exit" type thrown by the
> exit opcode.
> 
> Also, "die" and "exit" aren't listed in the 
> "Opcodes that Throw Exceptions" section a bit later in pdd23.
> 
> Pm

Attached is a patch that adds the exception;exit and exception;death 
exception types.

Note that "die" and "exit" are not listed in the section "opcodes that 
throw exceptions", and I think that's on purpose. These ops do throw an 
exception, but that's their sole purpose, which is why they're listed in 
the section "Exception Opcodes". IMO, the section "opcodes that throw 
exceptions" is meant only for exceptions that should do something but 
can throw an exception if there's something wrong. Exit and die are 
specialized throwing ops, as far as I can tell.

I'm not sure about the descriptions in my patch, so that's why I don't 
commit it myself (they're slightly poor, but I figured most of their 
descriptions is in the pdd already). It's just to make the list of 
exception types complete.

Could anybody have a look at this? Then we can close the ticket.
Thanks!!
kjs


-------------- next part --------------
Index: docs/pdds/pdd23_exceptions.pod
===================================================================
--- docs/pdds/pdd23_exceptions.pod	(revision 33361)
+++ docs/pdds/pdd23_exceptions.pod	(working copy)
@@ -226,11 +226,21 @@
 Base class of all standard exceptions.  Provides no special functionality.
 Exists for the purpose of C<isa> testing.
 
+=item B<exception;death>
+
+Exception type that is thrown by the C<die> opcode. See the description of
+the C<die> opcode in this document.
+
 =item B<exception;errno>
 
 A system error as reported in the C variable C<errno>.  Payload is an integer.
 Message is the return value of the standard C function C<strerror()>.
 
+=item B<exception;exit>
+
+Exception type that is thrown by the C<exit> opcode. See the description of
+the C<exit> opcode in this document.
+
 =item B<exception;math>
 
 Generic base class for math errors.


More information about the parrot-dev mailing list