Rh[vdZGddeZGddeZGddeZGddeZGd d eZy ) z!Different kinds of SAX Exceptionsc0eZdZdZddZdZdZdZdZy) SAXExceptionaEncapsulate an XML error or warning. This class can contain basic error or warning information from either the XML parser or the application: you can subclass it to provide additional functionality, or to add localization. Note that although you will receive a SAXException as the argument to the handlers in the ErrorHandler interface, you are not actually required to raise the exception; instead, you can simply read the information in it.NcL||_||_tj||y)zUCreates an exception. The message is required, but the exception is optional.N)_msg _exception Exception__init__)selfmsg exceptions */usr/lib/python3.12/xml/sax/_exceptions.pyrzSAXException.__init__s" #4%c|jS)z$Return a message for this exception.rr s r getMessagezSAXException.getMessage yyr c|jS)z9Return the embedded exception, or None if there was none.)rrs r getExceptionzSAXException.getExceptions r c|jS)0Create a string representation of the exception.rrs r __str__zSAXException.__str__rr ctd)zvAvoids weird error messages if someone does exception[ix] by mistake, since Exception has __getitem__ defined. __getitem__)AttributeError)r ixs r rzSAXException.__getitem__"s]++r )N) __name__ __module__ __qualname____doc__rrrrrr r rrs  &,r rc4eZdZdZdZdZdZdZdZdZ y) SAXParseExceptiona#Encapsulate an XML parse error or warning. This exception will include information for locating the error in the original XML document. Note that although the application will receive a SAXParseException as the argument to the handlers in the ErrorHandler interface, the application is not actually required to raise the exception; instead, it can simply read the information in it and take a different action. Since this exception is a subclass of SAXException, it inherits the ability to wrap another exception.ctj|||||_|jj|_|jj |_|jj|_y)zECreates the exception. The exception parameter is allowed to be None.N) rr_locator getSystemId _systemIdgetColumnNumber_colnum getLineNumber_linenum)r r r locators r rzSAXParseException.__init__7sYdC3 224}}446  335 r c|jS)zNThe column number of the end of the text where the exception occurred.)r(rs r r'z!SAXParseException.getColumnNumberDs||r c|jS)zDThe line number of the end of the text where the exception occurred.)r*rs r r)zSAXParseException.getLineNumberIs }}r c6|jjS)zEGet the public identifier of the entity where the exception occurred.)r$ getPublicIdrs r r/zSAXParseException.getPublicIdMs}}((**r c|jS)zEGet the system identifier of the entity where the exception occurred.)r&rs r r%zSAXParseException.getSystemIdQs ~~r c|j}|d}|j}|d}|j}|d}|d|d|d|jS)rz ?:z: )r%r)r'r)r sysidlinenumcolnums r rzSAXParseException.__str__Us]  " =E$$& ?G%%' >F!&CCr N) rrrrrr'r)r/r%rr r r r"r"*s& . 6 + Dr r"ceZdZdZy)SAXNotRecognizedExceptionzException class for an unrecognized identifier. An XMLReader will raise this exception when it is confronted with an unrecognized feature or property. SAX applications and extensions may use this class for similar purposes.Nrrrrr r r r8r8es,r r8ceZdZdZy)SAXNotSupportedExceptionaException class for an unsupported operation. An XMLReader will raise this exception when a service it cannot perform is requested (specifically setting a state or value). SAX applications and extensions may use this class for similar purposes.Nr9r r r r;r;osr r;ceZdZdZy)SAXReaderNotAvailableaException class for a missing driver. An XMLReader module (driver) should raise this exception when it is first imported, e.g. when a support module cannot be imported. It also may be raised during parsing, e.g. if executing an external program is not permitted.Nr9r r r r=r=ys!r r=N)rrrr"r8r;r=r r r r>sI' ,9 ,J6D 6Dv, ,|!4!r