fj R d dl Z d dlZd dlZd dlmZ d dlmZ d dlmZm Z defdZ
dS ) N)Callable)capture_exception) XRayErrorXRayManagerExitfuncc F t j fd }|S )z
Basic logic of an X-Ray application:
- catch all known errors and print them
as basic cloudlinux error messages
c J | i |S # t $ rH}t j d| t | t j |j Y d }~d S d }~wt $ r=}t | t | t j d Y d }~d S d }~ww xY w)NzExiting on exception %s ) r logginginfoprintsysexitexitcoder r )argskwargser s R/opt/cloudlinux/venv/lib64/python3.11/site-packages/xray/console_utils/base_app.pywrapperzapp.