� ��f�c@s�dZddlZejdd�dkr>ddlmZn[Gdd�de�ZGdd �d e�ZGd d �d e�ZGd d �d e�ZGdd�de�Z dS(u!Different kinds of SAX ExceptionsiNiujava(u ExceptioncBsY|EeZdZdZd dd�Zdd�Zdd�Zdd �Zd d �Z d S( u SAXExceptionu�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.cCs&||_||_tj||�dS(uUCreates an exception. The message is required, but the exception is optional.N(u_msgu _exceptionu Exceptionu__init__(uselfumsgu exception((u8/opt/alt/python33/lib64/python3.3/xml/sax/_exceptions.pyu__init__s  uSAXException.__init__cCs|jS(u$Return a message for this exception.(u_msg(uself((u8/opt/alt/python33/lib64/python3.3/xml/sax/_exceptions.pyu getMessagesuSAXException.getMessagecCs|jS(u9Return the embedded exception, or None if there was none.(u _exception(uself((u8/opt/alt/python33/lib64/python3.3/xml/sax/_exceptions.pyu getExceptionsuSAXException.getExceptioncCs|jS(u0Create a string representation of the exception.(u_msg(uself((u8/opt/alt/python33/lib64/python3.3/xml/sax/_exceptions.pyu__str__"suSAXException.__str__cCstd��dS(uvAvoids weird error messages if someone does exception[ix] by mistake, since Exception has __getitem__ defined.u __getitem__N(uAttributeError(uselfuix((u8/opt/alt/python33/lib64/python3.3/xml/sax/_exceptions.pyu __getitem__&suSAXException.__getitem__N( u__name__u __module__u __qualname__u__doc__uNoneu__init__u getMessageu getExceptionu__str__u __getitem__(u __locals__((u8/opt/alt/python33/lib64/python3.3/xml/sax/_exceptions.pyu SAXException s    u SAXExceptioncBsb|EeZdZdZdd�Zdd�Zdd�Zdd �Zd d �Zd d �Z dS(uSAXParseExceptionu#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.cCsVtj|||�||_|jj�|_|jj�|_|jj�|_dS(uECreates the exception. The exception parameter is allowed to be None.N( u SAXExceptionu__init__u_locatoru getSystemIdu _systemIdugetColumnNumberu_colnumu getLineNumberu_linenum(uselfumsgu exceptionulocator((u8/opt/alt/python33/lib64/python3.3/xml/sax/_exceptions.pyu__init__;s  uSAXParseException.__init__cCs|jS(uNThe column number of the end of the text where the exception occurred.(u_colnum(uself((u8/opt/alt/python33/lib64/python3.3/xml/sax/_exceptions.pyugetColumnNumberHsu!SAXParseException.getColumnNumbercCs|jS(uDThe line number of the end of the text where the exception occurred.(u_linenum(uself((u8/opt/alt/python33/lib64/python3.3/xml/sax/_exceptions.pyu getLineNumberMsuSAXParseException.getLineNumbercCs |jj�S(uEGet the public identifier of the entity where the exception occurred.(u_locatoru getPublicId(uself((u8/opt/alt/python33/lib64/python3.3/xml/sax/_exceptions.pyu getPublicIdQsuSAXParseException.getPublicIdcCs|jS(uEGet the system identifier of the entity where the exception occurred.(u _systemId(uself((u8/opt/alt/python33/lib64/python3.3/xml/sax/_exceptions.pyu getSystemIdUsuSAXParseException.getSystemIdcCsz|j�}|dkr!d}n|j�}|dkrBd}n|j�}|dkrcd}nd||||jfS(u0Create a string representation of the exception.u <unknown>u?u %s:%s:%s: %sN(u getSystemIduNoneu getLineNumberugetColumnNumberu_msg(uselfusysidulinenumucolnum((u8/opt/alt/python33/lib64/python3.3/xml/sax/_exceptions.pyu__str__Ys         uSAXParseException.__str__N( u__name__u __module__u __qualname__u__doc__u__init__ugetColumnNumberu getLineNumberu getPublicIdu getSystemIdu__str__(u __locals__((u8/opt/alt/python33/lib64/python3.3/xml/sax/_exceptions.pyuSAXParseException.s     uSAXParseExceptioncBs|EeZdZdZdS(uSAXNotRecognizedExceptionu�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(u__name__u __module__u __qualname__u__doc__(u __locals__((u8/opt/alt/python33/lib64/python3.3/xml/sax/_exceptions.pyuSAXNotRecognizedExceptionisuSAXNotRecognizedExceptioncBs|EeZdZdZdS(uSAXNotSupportedExceptionuException 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(u__name__u __module__u __qualname__u__doc__(u __locals__((u8/opt/alt/python33/lib64/python3.3/xml/sax/_exceptions.pyuSAXNotSupportedExceptionssuSAXNotSupportedExceptioncBs|EeZdZdZdS(uSAXReaderNotAvailableuException 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(u__name__u __module__u __qualname__u__doc__(u __locals__((u8/opt/alt/python33/lib64/python3.3/xml/sax/_exceptions.pyuSAXReaderNotAvailable}suSAXReaderNotAvailable( u__doc__usysuplatformu java.langu Exceptionu SAXExceptionuSAXParseExceptionuSAXNotRecognizedExceptionuSAXNotSupportedExceptionuSAXReaderNotAvailable(((u8/opt/alt/python33/lib64/python3.3/xml/sax/_exceptions.pyu<module>s %;