$29 GRAYBYTE WORDPRESS FILE MANAGER $65

SERVER : premium201.web-hosting.com #1 SMP Wed Mar 26 12:08:09 UTC 2025
SERVER IP : 104.21.15.130 | ADMIN IP 216.73.216.174
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/opt/hc_python/lib/python3.12/site-packages/mysql/connector/__pycache__/

HOME
Current File : /opt/hc_python/lib/python3.12/site-packages/mysql/connector/__pycache__//errors.cpython-312.pyc
�

H��g�'����dZddlmZddlmZddlmZiad4d�Zd4d�Z	d�Z
Gd	�d
e�ZGd�de�Z
Gd
�de�ZGd�de�ZGd�de�ZGd�de�ZGd�de�ZGd�de�ZGd�de�ZGd�de�ZGd�de�ZGd�d e�Zid!e�d"e�d#e�d$e�d%e�d&e�d'e�d(e�d)e�d*e�d+e�d,e�d-e�d.e�d/e�d0e�d1e�eeeeeeeeeeeeeed2��Zeeeeeeed3�Zy)5zPython exceptions
�)�utils)�get_client_error)�PY2Nc��t|t�rt|�siatS|s|stSt|ttf�std��t|t�r||i}|j
�D]A\}}t|t�std��	t|t�st�	|t|<�CtS#t$rtd��wxYw)ayDefine custom exceptions for MySQL server errors

    This function defines custom exceptions for MySQL server errors and
    returns the current set customizations.

    If error is a MySQL Server error number, then you have to pass also the
    exception class.

    The error argument can also be a dictionary in which case the key is
    the server error number, and value the exception to be raised.

    If none of the arguments are given, then custom_error_exception() will
    simply return the current set customizations.

    To reset the customizations, simply supply an empty dictionary.

    Examples:
        import mysql.connector
        from mysql.connector import errorcode

        # Server error 1028 should raise a DatabaseError
        mysql.connector.custom_error_exception(
            1028, mysql.connector.DatabaseError)

        # Or using a dictionary:
        mysql.connector.custom_error_exception({
            1028: mysql.connector.DatabaseError,
            1029: mysql.connector.OperationalError,
            })

        # Reset
        mysql.connector.custom_error_exception({})

    Returns a dictionary.
    z<The error argument should be either an integer or dictionaryz!error number should be an integerz)exception should be subclass of Exception)
�
isinstance�dict�len�_CUSTOM_ERROR_EXCEPTIONS�int�
ValueError�items�
issubclass�	Exception�	TypeError)�error�	exception�errnos   �m/opt/hc_python/lib64/python3.12/site-packages/../../../lib/python3.12/site-packages/mysql/connector/errors.py�custom_error_exceptionr%s���L�%���s�5�z�#%� �'�'���'�'��e�c�4�[�)��J�L�	L��%����	�"��!�K�K�M���y��%��%��@�A�A�	J��i��3���4�+4� ��'�*�$�#��	�	J��H�I�I�	J�s�B=�=Cc��	t||||��S#t$rYnwxYw	t||||��S#t$rYnwxYw|s
t||��S	t	|dd|||��S#t$rt|||��cYSwxYw)a>Get the exception matching the MySQL error

    This function will return an exception based on the SQLState. The given
    message will be passed on in the returned exception.

    The exception returned can be customized using the
    mysql.connector.custom_error_exception() function.

    Returns an Exception
    )�msgr�sqlstate)rr��)r
�KeyError�_ERROR_EXCEPTIONS�
DatabaseError�_SQLSTATE_CLASS_EXCEPTION)rrrs   r�get_mysql_exceptionres���
�'��.��5�8�5�	5���
��
��
� ��'��5�8�5�	5���
��
�����E�2�2�F�(��!�A��7��5�8�5�	5���F���E�H�E�E�F�s,��	��4�	A�A�A'�'B�Bc��dx}}	|ddk7rtd��	d}	|dd}tj|d�\}}|dd	k7r+t|ttf�r|jd
�}nA|}n>tj|ddd�\}}|jd
�}|jd
�}t|||�S#t$r}td|z�cYd}~Sd}~wwxYw#t$r}td|z�cYd}~Sd}~wwxYw)z�Returns an exception object based on the MySQL error

    Returns an exception object based on the MySQL error in the given
    packet.

    Returns an Error-Object.
    N��zPacket is not an error packetz%Failed getting Error information (%r)�rr�#�utf8r)r�
IndexError�InterfaceErrorr�read_intr�bytes�	bytearray�decode�
read_bytesrr)�packetr�errmsg�errrs     r�
get_exceptionr0�s����E�F�M��!�9����<�=�=��
�H�<�������.�.���3�����!�9��?��&�5�)�"4�5����v�.����!&�!1�!1�&���*�a�!@��V�X����v�.�H��]�]�6�*�F�#�5�&�(�;�;��)�M��E��K�L�L��M��"�M��E��K�L�L��M�s;�B9�BC�9	C�
C�C�C�	C>�&
C9�3C>�9C>c�*��eZdZdZd�fd�	Zd�Z�xZS)�Errorz;Exception that is base class for all other error exceptionsc�F��tt|��||_|j|_|xsd|_||_|jsJd|j
cxkrdkr5nn2t|j
�|_|�0	|j|z|_n|jsdx|_|_|jr�|j
dk7rq|j
tr|jjd�n|jd�}|jrd}|j|d	<nd
}|jdi|��|_|j
|j|jf|_
y#t$r4}dj|jt|��|_Yd}~��d}~wwxYw)N���i�i�z{0} (Warning: {1})z
Unknown errorr%)rrz{errno} ({state}): {msg}�statez{errno}: {msg}�)�superr2�__init__r�	_full_msgrrrr�format�strr�encode�args)	�selfrr�valuesrr/�fields�fmt�	__class__s	        �rr8zError.__init__�sG���
�e�T�#�%����������[�b��
� ��
��x�x�T�T�Z�Z�6�$�6�'��
�
�3�D�H��!�O�#�x�x�&�0�D�H����(7�7�D�N�T�X��8�8��
�
�b�(����25�t�x�x���v�.�4�8�8��F��}�}�0��"&�-�-��w��&��'�S�Z�Z�1�&�1�D�N��Z�Z�������?��	��#!�O�3�:�:�4�8�8�S��X�N�D�H�H��O�s�?E#�#	F �,*F�F c��|jS)N)r9)r>s r�__str__z
Error.__str__�s���~�~��)NNNN)�__name__�
__module__�__qualname__�__doc__r8rD�
__classcell__)rBs@rr2r2�s���E�@�>rEr2c��eZdZdZy)�Warningz Exception for important warningsN�rFrGrHrIr6rErrLrL�s��*�rErLc��eZdZdZy)r'z-Exception for errors related to the interfaceNrMr6rErr'r'����7�rEr'c��eZdZdZy)rz,Exception for errors related to the databaseNrMr6rErrr�s��6�rErc��eZdZdZy)�
InternalErrorz-Exception for errors internal database errorsNrMr6rErrRrR�rOrErRc��eZdZdZy)�OperationalErrorz8Exception for errors related to the database's operationNrMr6rErrTrT�s��B�rErTc��eZdZdZy)�ProgrammingErrorz'Exception for errors programming errorsNrMr6rErrVrV�s��1�rErVc��eZdZdZy)�IntegrityErrorz3Exception for errors regarding relational integrityNrMr6rErrXrX����=�rErXc��eZdZdZy)�	DataErrorz;Exception for errors reporting problems with processed dataNrMr6rErr[r[�s��E�rEr[c��eZdZdZy)�NotSupportedErrorzBException for errors when an unsupported database feature was usedNrMr6rErr]r]�s��L�rEr]c��eZdZdZy)�	PoolErrorz3Exception for errors relating to connection poolingNrMr6rErr_r_�rYrEr_c��eZdZdZy)�MySQLFabricErrorz-Exception for errors relating to MySQL FabricNrMr6rErraras��7rEra�02�07�08�0A�21�22�23�24�25�26�27�28�2A�2B�2C�2D�2E)�33�34�35�37�3C�3D�3F�40�42�44�HZ�XA�0K�HY)i�i�i�i�iii
)NN)rI�r�localesr�catch23rr
rrr0rr2rLr'rrRrTrVrXr[r]r_rarrr6rEr�<module>r�s���0��%��
��>$�@!F�F!<�H"�I�"�J	�i�	�
	�U�	�
	�E�	�
	�M�	�
	�}�	�
	�}�	�
	�]�	�
	�
�	�
	�
�	�
	��	�
8�u�8� ��)� ��-� �	�
� �	�
�	 �
	�)� �	�)�
 �	�.� �	�
� �	�
� �	�
� �	�
� �	�
� �	�
� �	�-� �	�
� � 	�-�! �"	�-�# �$�
�
�
�
�
�
�
�
�
�
�
�
�
�? ��F�
�
�
�
�
�
��rE


Current_dir [ NOT WRITEABLE ] Document_root [ WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
4 Apr 2025 8.03 AM
root / root
0755
__init__.cpython-312.pyc
6.22 KB
4 Apr 2025 8.03 AM
root / root
0644
abstracts.cpython-312.pyc
45.927 KB
4 Apr 2025 8.03 AM
root / root
0644
authentication.cpython-312.pyc
6.945 KB
4 Apr 2025 8.03 AM
root / root
0644
catch23.cpython-312.pyc
3.324 KB
4 Apr 2025 8.03 AM
root / root
0644
charsets.cpython-312.pyc
5.954 KB
4 Apr 2025 8.03 AM
root / root
0644
connection.cpython-312.pyc
46.72 KB
4 Apr 2025 8.03 AM
root / root
0644
connection_cext.cpython-312.pyc
26.627 KB
4 Apr 2025 8.03 AM
root / root
0644
constants.cpython-312.pyc
24.672 KB
4 Apr 2025 8.03 AM
root / root
0644
conversion.cpython-312.pyc
23.326 KB
4 Apr 2025 8.03 AM
root / root
0644
cursor.cpython-312.pyc
55.982 KB
4 Apr 2025 8.03 AM
root / root
0644
cursor_cext.cpython-312.pyc
34.614 KB
4 Apr 2025 8.03 AM
root / root
0644
custom_types.cpython-312.pyc
1.353 KB
4 Apr 2025 8.03 AM
root / root
0644
dbapi.cpython-312.pyc
2.406 KB
4 Apr 2025 8.03 AM
root / root
0644
errorcode.cpython-312.pyc
50.409 KB
4 Apr 2025 8.03 AM
root / root
0644
errors.cpython-312.pyc
9.643 KB
4 Apr 2025 8.03 AM
root / root
0644
network.cpython-312.pyc
21.664 KB
4 Apr 2025 8.03 AM
root / root
0644
optionfiles.cpython-312.pyc
13.544 KB
4 Apr 2025 8.03 AM
root / root
0644
pooling.cpython-312.pyc
13.969 KB
4 Apr 2025 8.03 AM
root / root
0644
protocol.cpython-312.pyc
30.848 KB
4 Apr 2025 8.03 AM
root / root
0644
utils.cpython-312.pyc
10.057 KB
4 Apr 2025 8.03 AM
root / root
0644
version.cpython-312.pyc
0.684 KB
4 Apr 2025 8.03 AM
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF