Your IP : 3.21.12.41


Current Path : /opt/alt/python310/lib64/python3.10/xml/sax/__pycache__/
Upload File :
Current File : //opt/alt/python310/lib64/python3.10/xml/sax/__pycache__/_exceptions.cpython-310.pyc

o

6��f��@s�dZddlZejdd�dkrddlmZ[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||_||_t�||�dS)zUCreates an exception. The message is required, but the exception
        is optional.N)�_msg�
_exceptionr�__init__)�self�msg�	exception�r�:/opt/alt/python310/lib64/python3.10/xml/sax/_exceptions.pyrszSAXException.__init__cC�|jS)z$Return a message for this exception.�r�r	rrr
�
getMessage�zSAXException.getMessagecCr)z9Return the embedded exception, or None if there was none.)rrrrr
�getExceptionrzSAXException.getExceptioncCr)�0Create a string representation of the exception.rrrrr
�__str__"rzSAXException.__str__cCstd��)zvAvoids weird error messages if someone does exception[ix] by
        mistake, since Exception has __getitem__ defined.�__getitem__)�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<t�|||�||_|j��|_|j��|_|j��|_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__cCr)zNThe column number of the end of the text where the exception
        occurred.)r!rrrr
r Hsz!SAXParseException.getColumnNumbercCr)zDThe line number of the end of the text where the exception occurred.)r#rrrr
r"MrzSAXParseException.getLineNumbercCs
|j��S)zEGet the public identifier of the entity where the exception occurred.)r�getPublicIdrrrr
r$Qs
zSAXParseException.getPublicIdcCr)zEGet the system identifier of the entity where the exception occurred.)rrrrr
rUrzSAXParseException.getSystemIdcCsN|��}|dur
d}|��}|durd}|��}|durd}d||||jfS)rNz	<unknown>�?z%s:%s:%s: %s)rr"r r)r	ZsysidZlinenumZcolnumrrr
rYszSAXParseException.__str__N)
rrrrrr r"r$rrrrrr
r.s
rc@�eZdZdZdS)�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'i�r'c@r&)�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.Nr(rrrr
r*sr)r*c@r&)�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.Nr(rrrr
r+}r)r+)
r�sys�platformZ	java.langrrrr'r*r+rrrr
�<module>s%;


?>