3 \±ã@s€dZddlZejdd…dkr*ddlmZ[Gdd„deƒZGdd „d eƒZGd d „d eƒZGd d „d eƒZGdd„deƒZ dS)z!Different kinds of SAX ExceptionséNéÚjava)Ú Exceptionc@s:eZdZdZd dd„Zdd„Zdd„Zd d „Zd d „ZdS)Ú SAXExceptionaÖEncapsulate 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.NcCs||_||_tj||ƒdS)zUCreates an exception. The message is required, but the exception is optional.N)Ú_msgÚ _exceptionrÚ__init__)ÚselfÚmsgÚ exception©r ú#/usr/lib64/python3.6/_exceptions.pyrszSAXException.__init__cCs|jS)z$Return a message for this exception.)r)r r r r Ú getMessageszSAXException.getMessagecCs|jS)z9Return the embedded exception, or None if there was none.)r)r r r r Ú getExceptionszSAXException.getExceptioncCs|jS)z0Create a string representation of the exception.)r)r r r r Ú__str__"szSAXException.__str__cCs tdƒ‚dS)zvAvoids weird error messages if someone does exception[ix] by mistake, since Exception has __getitem__ defined.Ú __getitem__N)ÚAttributeError)r Zixr r r r&szSAXException.__getitem__)N) Ú__name__Ú __module__Ú __qualname__Ú__doc__rrrrrr r r r r s  rc@s@eZdZdZdd„Zdd„Zdd„Zdd „Zd d „Zd d „Z dS)Ú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.cCs<tj|||ƒ||_|jjƒ|_|jjƒ|_|jjƒ|_dS)zECreates the exception. The exception parameter is allowed to be None.N) rrÚ_locatorÚ getSystemIdÚ _systemIdÚgetColumnNumberÚ_colnumÚ getLineNumberÚ_linenum)r r r Zlocatorr r r r;s   zSAXParseException.__init__cCs|jS)zNThe column number of the end of the text where the exception occurred.)r)r r r r rHsz!SAXParseException.getColumnNumbercCs|jS)zDThe line number of the end of the text where the exception occurred.)r)r r r r rMszSAXParseException.getLineNumbercCs |jjƒS)zEGet the public identifier of the entity where the exception occurred.)rÚ getPublicId)r r r r rQszSAXParseException.getPublicIdcCs|jS)zEGet the system identifier of the entity where the exception occurred.)r)r r r r rUszSAXParseException.getSystemIdcCsN|jƒ}|dkrd}|jƒ}|dkr(d}|jƒ}|dkrú?z %s:%s:%s: %s)rrrr)r ZsysidZlinenumZcolnumr r r rYszSAXParseException.__str__N) rrrrrrrrrrr r r r r.s  rc@seZdZdZdS)ÚSAXNotRecognizedExceptionzìException 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.N)rrrrr r r r r!isr!c@seZdZdZdS)Ú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.N)rrrrr r r r r"ssr"c@seZdZdZdS)Ú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.N)rrrrr r r r r#}sr#) rÚsysÚplatformZ java.langrrrr!r"r#r r r r Ús %;