XML::SAX::Exception - Exception classes for XML::SAX
throw XML::SAX::Exception::NotSupported( Message => "The foo feature is not supported", );
User Contributed Perl Documentation XML::SAX::Exception(3) NAME XML::SAX::Exception - Exception classes for XML::SAX SYNOPSIS throw XML::SAX::Exception::NotSupported( Message => "The foo feature is not supported", ); DESCRIPTION This module is the base class for all SAX Exceptions, those defined in the spec as well as those that one may create for one's own SAX errors. There are three subclasses included, corresponding to those of the SAX spec: XML::SAX::Exception::NotSupported XML::SAX::Exception::NotRecognized XML::SAX::Exception::Parse Use them wherever you want, and as much as possible when you encounter such errors. SAX is meant to use exceptions as much as possible to flag problems. CREATING NEW EXCEPTION CLASSES All you need to do to create a new exception class is: @XML::SAX::Exception::MyException::ISA = ('XML::SAX::Exception') The given package doesn't need to exist, it'll behave correctly this way. If your exception refines an existing exception class, then you may also inherit from that instead of from the base class. THROWING EXCEPTIONS This is as simple as exemplified in the SYNOPSIS. In fact, there's nothing more to know. All you have to do is: throw XML::SAX::Exception::MyException( Message => 'Something went wrong' ); and voila, you've thrown an exception which can be caught in an eval block. ATTRIBUTES See attributes(7) for descriptions of the following attributes: +---------------+---------------------------------+ |ATTRIBUTE TYPE | ATTRIBUTE VALUE | +---------------+---------------------------------+ |Availability | library/perl-5/xml-sax-base-532 | +---------------+---------------------------------+ |Stability | Volatile | +---------------+---------------------------------+ NOTES Source code for open source software components in Oracle Solaris can be found at https://www.oracle.com/downloads/opensource/solaris-source- code-downloads.html. This software was built from source available at https://github.com/oracle/solaris-userland. The original community source was downloaded from http://search.cpan.org/CPAN/authors/id/G/GR/GRANTM/XML-SAX- Base-1.08.tar.gz. Further information about this software can be found on the open source community website at http://search.cpan.org/~grantm/. perl v5.32.0 2011-09-14 XML::SAX::Exception(3)