Servlet::ServletException - general servlet exception
package My::Servlet; use base qw(Servlet::GenericServlet); use Servlet::ServletException (); sub service { # ... eval { # ... }; if ($@) { Servlet::ServletException->throw('something broke', root => $@); }; # ... }
Defines a general exception a servlet can throw when it encounters difficulty.
Constructs a new servlet exception. Optional arguments include an error message and the "root cause" exception that was encountered by the servlet.
Parameters:
the error message
the exception that is the root cause of this exception
Returns the exception that caused this servlet exception.
Servlet::Util::Exception
Brian Moseley, bcm@maz.org
To install Servlet, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Servlet
CPAN shell
perl -MCPAN -e shell install Servlet
For more information on module installation, please visit the detailed CPAN module installation guide.