{"id":6689,"date":"2022-12-20T19:33:25","date_gmt":"2022-12-20T22:33:25","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/xmlsaxexception-man3\/"},"modified":"2022-12-20T19:33:25","modified_gmt":"2022-12-20T22:33:25","slug":"xmlsaxexception-man3","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/xmlsaxexception-man3\/","title":{"rendered":"XML::SAX::Exception (man3)"},"content":{"rendered":"<h1 align=\"center\">XML::SAX::Exception<\/h1>\n<p> <a href=\"#NAME\">NAME<\/a><br \/> <a href=\"#SYNOPSIS\">SYNOPSIS<\/a><br \/> <a href=\"#DESCRIPTION\">DESCRIPTION<\/a><br \/> <a href=\"#CREATING NEW EXCEPTION CLASSES\">CREATING NEW EXCEPTION CLASSES<\/a><br \/> <a href=\"#THROWING EXCEPTIONS\">THROWING EXCEPTIONS<\/a> <\/p>\n<hr>\n<h2>NAME <a name=\"NAME\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">XML::SAX::Exception \u2212 Exception classes for XML::SAX<\/p>\n<h2>SYNOPSIS <a name=\"SYNOPSIS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">throw XML::SAX::Exception::NotSupported( <br \/> Message => &#8220;The foo feature is not supported&#8221;, <br \/> );<\/p>\n<h2>DESCRIPTION <a name=\"DESCRIPTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">This module is the base class for all <small>SAX<\/small> Exceptions, those defined in the spec as well as those that one may create for one\u2019s own <small>SAX<\/small> errors.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">There are three subclasses included, corresponding to those of the <small>SAX<\/small> spec:<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">XML::SAX::Exception::NotSupported <br \/> XML::SAX::Exception::NotRecognized <br \/> XML::SAX::Exception::Parse<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Use them wherever you want, and as much as possible when you encounter such errors. <small>SAX<\/small> is meant to use exceptions as much as possible to flag problems.<\/p>\n<h2>CREATING NEW EXCEPTION CLASSES <a name=\"CREATING NEW EXCEPTION CLASSES\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">All you need to do to create a new exception class is:<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">@XML::SAX::Exception::MyException::ISA = (&#8216;XML::SAX::Exception&#8217;)<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The given package doesn\u2019t need to exist, it\u2019ll 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.<\/p>\n<h2>THROWING EXCEPTIONS <a name=\"THROWING EXCEPTIONS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">This is as simple as exemplified in the <small>SYNOPSIS.<\/small> In fact, there\u2019s nothing more to know. All you have to do is:<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">throw XML::SAX::Exception::MyException( Message => &#8216;Something went wrong&#8217; );<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">and voila, you\u2019ve thrown an exception which can be caught in an eval block.<\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>  XML::SAX::Exception \u2212 Exception classes for XML::SAX <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[3007,3068],"class_list":["post-6689","post","type-post","status-publish","format-standard","hentry","category-sin-categoria","tag-man3","tag-xmlsaxexception"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/6689","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/comments?post=6689"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/6689\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=6689"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=6689"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=6689"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}