PROPAGATE documentation from Tony Cook.
authorJarkko Hietaniemi <jhi@iki.fi>
Mon, 26 Nov 2001 10:35:56 +0000 (10:35 +0000)
committerJarkko Hietaniemi <jhi@iki.fi>
Mon, 26 Nov 2001 10:35:56 +0000 (10:35 +0000)
p4raw-id: //depot/perl@13280

pod/perlfunc.pod

index b6e6312..7823d4b 100644 (file)
@@ -1076,6 +1076,12 @@ This is useful for propagating exceptions:
     eval { ... };
     die unless $@ =~ /Expected exception/;
 
+If LIST is empty and C<$@> contains an object reference that has a
+C<PROPAGATE> method, that method will be called with additional file
+and line number parameters.  The return value replaces the value in
+C<$@>.  ie. as if C<<$@ = eval { $@->PROPAGATE(__FILE__, __LINE__) };>> 
+were called.
+
 If C<$@> is empty then the string C<"Died"> is used.
 
 die() can also be called with a reference argument.  If this happens to be