관리-도구
편집 파일: exceptions.cpython-311.pyc
� 9�1g � � � d Z ddlZ G d� de� � Z G d� de� � Z G d� de� � Z G d � d e� � ZdS )z/ This module contains custom exception classes � Nc �@ � � e Zd ZdZddd�dededef� fd�Zdd�Z� xZS ) �SSAErrorz� SSA internal exception class. Adds an 'error' status and stores information about occurred exception. Provides JSON encoded info about occurred exception. �errorN)�flag�extra�messager r c � �� t � � � |� � d| _ || _ || _ || _ d S )Nr )�super�__init__�status�reason� extra_data� type_flag)�selfr r r � __class__s ��N/opt/cloudlinux/venv/lib64/python3.11/site-packages/ssa/internal/exceptions.pyr zSSAError.__init__ s; �� � ������!�!�!��������������� �return�json strc �h � | j dk rd| j d�}n d| j i}t j |� � S )N�warning�success)�resultr r )r r �json�dumps)r �msgs r �__str__zSSAError.__str__ sE � ��>�Y�&�&�#��;�� �C�C� �$�+��C� �z�#���r )r r ) �__name__� __module__�__qualname__�__doc__�str�dictr r � __classcell__)r s @r r r s� �� � � � � �� � 5<�#�� � �� �c� ��� � � � � � � � � � � � � r r c � � e Zd ZdZdS )� SSAAgentErrorz# SSA Agent exception class N�r r r r! � r r r&