I
Irving Kimura
(Note to the impatient: The connection with Perl doesn't emerge
until the end of this post.)
I find that nothing complicates and obfuscates my code more than
the problem of dealing with errors: user errors, system errors,
algorithm-design errors...
Just checking for the occurrence of errors and doing something dumb
like aborting the program is bad enough, but trying to make my code
fault-tolerant and/or make it generate reasonably helpful error
messages, turns my code into a horror show. (If on top of this I
add CGI as the context, I begin to contemplate seppuku as the only
way to avoid disgrace.)
The truth of the matter is that I have yet to find a good way to
architect my error handling. Granted, there are many types/levels
of error (as mentioned above) and handling each of these may require
an entirely different architecture. It doesn't matter: I haven't
hit upon a good formula for any of them.
Now I'm at the stage of learning good Perl programming, which
includes reading good Perl source, so I would like to study examples
of Perl modules (from CPAN) with well-designed error-handling
schemes.
Any recommendations would be greatly appreciated.
Irv
until the end of this post.)
I find that nothing complicates and obfuscates my code more than
the problem of dealing with errors: user errors, system errors,
algorithm-design errors...
Just checking for the occurrence of errors and doing something dumb
like aborting the program is bad enough, but trying to make my code
fault-tolerant and/or make it generate reasonably helpful error
messages, turns my code into a horror show. (If on top of this I
add CGI as the context, I begin to contemplate seppuku as the only
way to avoid disgrace.)
The truth of the matter is that I have yet to find a good way to
architect my error handling. Granted, there are many types/levels
of error (as mentioned above) and handling each of these may require
an entirely different architecture. It doesn't matter: I haven't
hit upon a good formula for any of them.
Now I'm at the stage of learning good Perl programming, which
includes reading good Perl source, so I would like to study examples
of Perl modules (from CPAN) with well-designed error-handling
schemes.
Any recommendations would be greatly appreciated.
Irv