in reply to CGI Error Handling
The simplest way to handle errors is eval block.
It acts like java try{}catch{} statement.
For example:
For complex error handling Error.pm module exists. It's very useful for scripts with an object-oriented structure. Example:eval{ ...code...}; if ($@) { handle error }
Looks like Java code :-)use Error; try{ do something... }catch Error::Simple with{ handling... }finally{ ... }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: CGI Error Handling
by davorg (Chancellor) on Dec 10, 2001 at 17:37 UTC |
In Section
Seekers of Perl Wisdom