GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  SERVLET::UTIL::EXCEPTION (3)

.ds Aq ’

NAME

Servlet::Util::Exception - exception base class

CONTENTS

SYNOPSIS



  eval {
      Servlet::Util::Exception->throw("oops");
  };

  if ($@) {
      warn "caught exception: $@\n";
  }



DESCRIPTION

This is a base class for exceptions. It extends <B>Exception::Class::BaseB>. See <B>Exception::ClassB> for a full list of inherited methods.

There is only one exception to the inherited API: tracing is on by default. This means that a stack trace will be created when an exception is thrown. By way of comparison to <B>java.lang.ThrowableB>, it’s as if fillInStackTrace() is automatically called inside throw(). To selectively disable tracing for a subclass, do the following:



  My::Exception::do_trace(0);



CONSTRUCTOR

new($msg) Construct an instance with the given error message.

Exceptions are rarely directly constructed. Usually they are constructed and thrown in one call to throw().

<B>Parameters:B>
$msg the error message

CLASS METHODS

throw($msg) Constructs an instance with the given error essage and then die()s.

<B>Parameters:B>
$msg the error message

METHODS

getMessage() Returns the error message.
toString() Returns a short description of the exception, including the stack trace if the exception has been thrown.

EXCEPTION SUBCLASSESS

These commonly encountered exceptions are provided as utilities.
<B>Servlet::Util::IOExceptionB> Thrown to indicate than an I/O exception of some sort has occurred.
<B>Servlet::Util::IllegalArgumentExceptionB> Thrown to indicate that a method has been passed an illegal or inappropriate argument.
<B>Servlet::Util::IllegalStateExceptionB> Thrown to indicate that a method has been invoked at an illegal or inappropriate time.
<B>Servlet::Util::IndexOutOfBoundsExceptionB> Thrown to indicate that an index of some sort (such as to an array) is out of range.
<B>Servlet::Util::UndefReferenceExceptionB> Thrown to indicate that undef was used in a case where a value is required.
<B>Servlet::Util::UnsupportedEncodingExceptionB> Thrown to indicate that the chosen character encoding is unsupported by the environment (most commonly encountered during character conversions on byte streams).

SEE ALSO

Exception::Class

AUTHOR

Brian Moseley, bcm@maz.org
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 SERVLET::UTIL::EXCEPTION (3) 2001-07-13

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.