Hacked By AnonymousFox

Current Path : /lib64/python3.6/xml/sax/__pycache__/
Upload File :
Current File : //lib64/python3.6/xml/sax/__pycache__/_exceptions.cpython-36.pyc

3


 \��@s�dZddlZejdd�dkr*ddlmZ[Gdd�de�ZGdd	�d	e�ZGd
d�de�ZGdd
�d
e�ZGdd�de�Z	dS)z!Different kinds of SAX Exceptions�N��java)�	Exceptionc@s:eZdZdZd
dd�Zdd�Zdd�Zd	d
�Zdd�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/xml/sax/_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
rZlocatorr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<d}d||||jfS)z0Create a string representation of the exception.Nz	<unknown>�?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
�<module>s%;


Hacked By AnonymousFox1.0, Coded By AnonymousFox