Query: xml::sax::exception
OS: suse
Section: 3
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
XML::SAX::Exception(3) User Contributed Perl Documentation XML::SAX::Exception(3)NAMEXML::SAX::Exception - Exception classes for XML::SAXSYNOPSISthrow XML::SAX::Exception::NotSupported( Message => "The foo feature is not supported", );DESCRIPTIONThis 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 CLASSESAll 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 EXCEPTIONSThis 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. perl v5.12.1 2010-07-05 XML::SAX::Exception(3)
Related Man Pages |
---|
xml::libxml::sax::builder5.18(3) - mojave |
xml::sax::exception5.18(3) - mojave |
xml::libxml::sax::builder(3) - mojave |
xml::libxml::sax(3) - osx |
xml::sax::exception(3pm) - debian |
Similar Topics in the Unix Linux Community |
---|
Parse XML file |
Parse XML file in shell script |
Exception to Private Message Limitation |
C++ Exception class missing? |
Get count of multiple word in single command |