관리-도구
편집 파일: exceptions.cpython-37.pyc
B � d � @ sP d Z ddlZG dd� de�ZG dd� de�ZG dd� de�ZG d d � d e�ZdS )z/ This module contains custom exception classes � Nc s@ e Zd ZdZddd�eeed�� fdd�Zdd �d d�Z� ZS )�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 s( t � �|� d| _|| _|| _|| _d S )Nr )�super�__init__�status�reasonZ extra_data� type_flag)�selfr r r )� __class__� �H/opt/alt/python37/lib/python3.7/site-packages/ssa/internal/exceptions.pyr s zSSAError.__init__zjson str)�returnc C s, | j dkrd| jd�}n d| ji}t�|�S )N�warningZsuccess)�resultr r )r r �json�dumps)r �msgr r r �__str__ s zSSAError.__str__) �__name__� __module__�__qualname__�__doc__�str�dictr r � __classcell__r r )r r r s r c @ s e Zd ZdZdS )� SSAAgentErrorz# SSA Agent exception class N)r r r r r r r r r * s r c @ s e Zd ZdZdS )�SSAManagerErrorz% SSA Manager exception class N)r r r r r r r r r 0 s r c @ s e Zd ZdZdS )�SSAMailerErrorz$ SSA Mailer exception class N)r r r r r r r r r 6 s r )r r � Exceptionr r r r r r r r �<module> s