hjkhjkjhkhjkgjghjhgjhgjghjhghjghjhgjjnbvnvbnvk
bnmbnmbnhjkhjkhjkhjktyutyutyuytutyutyutyhgjgjghjgjghjguytutyry
/
opt
/
alt
/
python37
/
lib
/
python3.7
/
site-packages
/
xray
/
internal
/
__pycache__
/
Upload FileeE
HOME
B �'Ud � @ s� d Z ddlZddlZe�d�ZG dd� de�ZG dd� de�ZG dd � d e�ZG d d� de�Z G dd � d e�Z G dd� de�ZdS )z/ This module contains custom exception classes � NZ exc_loggerc sD e Zd ZdZdddd�eeeed�� fdd�Zdd �d d�Z� Z S )� XRayErrorz� X-Ray internal exception class. Adds an 'error' status and stores information about occurred exception. Provides JSON encoded info about occurred exception. �errorN)�flag�extra�errno)�messager r r c sX t � �|� d| _|| _|| _|| _|| _|dkrDtj|| jd� ntj || jd� d S )Nr �warning)r ) �super�__init__�status�reason� extra_data� type_flagr �loggerr r )�selfr r r r )� __class__� �I/opt/alt/python37/lib/python3.7/site-packages/xray/internal/exceptions.pyr s zXRayError.__init__zjson str)�returnc C s, | j dkrd| jd�}n d| ji}t�|�S )Nr �success)�resultr r )r r �json�dumps)r �msgr r r �__str__&