Bullet-proof your program by trapping exceptions and handling them gracefully. Let’s stop beating around the bush. What we really want is the ability to type exceptions and preferably also to subclass them, then catch them according to class while passing along instance-specific data.[8] Just like in Java. While we’re at it, it should use the same try … throw … catch syntax. [8] Not everyone thinks this way, just to be fair. If you’d rather stick with die… eval, you’ll be in plenty of company. It seems that the Perl mascot could just as well be a chameleon as a camel, since it can take on so many colors. An implementation of the try … throw … catch capability is in the module Error.pm by Graham Barr, on CPAN (http://search.cpan.org/search?dist=Error). It allows you to write things like try { # Some relational database-munging code. Somewhere # inside this something might raise an exception with # a line like: throw Exception::SQL (-text => ‘Bad SELECT statement’); } catch Exception::SQL with { # Code to handle SQL exceptions } catch Exception::IO with { # Code to handle I/O exceptions } otherwise { # Code to handle other kinds of exceptions }; Exception::SQLand Exception::IO are classes of exception that we created earlier by the simple expediency of inheriting from Error itself: @Exception::SQL::ISA = ‘Error’; @Exception::IO::ISA = ‘Error’; An alternative to Error.pm is Brad Appleton’s AtExit CPAN module (http://search.cpan.org/search?dist=AtExit), which allows you to specify a handler routine to be executed whenever the current scope is left for any reason, similar to the C++ auto_ptr template class. For instance: use AtExit; … {
Note: If you are looking for top 10 and very good webhost to host and run your jsp application check Actions jsp hosting services