![]() |
|
Problems? Is your data what you think it is? | |
PerlMonks |
comment on |
( #3333=superdoc: print w/replies, xml ) | Need Help?? |
I have to agree with tilly and ichimonki, Carp is vital. Especially for CGI, where I always use Carp(fatalstobrowser).
Otherwise on subroutines if I'm piping back data, I tend to return an integer > 0 for error messages. Depending on the subroutine, I might have a range of error codes to return if I don't want the program to die there. You might try out page 348 of the Perl Cookbook, which has some suggestions on the undef, wantarray and return functions that you might find useful. This link is also good for silly die messages, if you're in the mood.
MadraghRua In reply to Re: Exceptions and Return Codes
by MadraghRua
|
|