src/Bundle/Debug/Wrap.php
public static function render(string $code, string $message, string $file, string $line, $context = null, array $backtrace = [], string $className = '')
    {
        if (ob_get_length()) {
            ob_clean();
        }
        $data = [
            'message' => 'From ' . $className . ' ' . $message,
            'code' => $code,
            'file' => $file,
            'line' => $line,
            'trace' => $backtrace,
            'context' => $context
        ];

        if (!empty($data['trace'])) {
            foreach ($data['trace'] as $k => $item) {
                if (isset($item['type'])) {
                    switch ($item['type']) {
                        case '->':
                            $data['trace'][$k]['type'] = 'method';
                            break;
                        case '::':
                            $data['trace'][$k]['type'] = 'static method';
                            break;
                        default:
                            $data['trace'][$k]['type'] = 'function';
                    }
                }
            }
        }

        $template = new Native(self::$packageRoot, '', false);
        $content = $template->getContent('catch', $data);
        $response = new Response();
        $response->setStatusCode(418);
        $response->setContent($content);
        $response->send();
        print_r($data);
        exit;
    }
public static function render(string $code, string $message, string $file, string $line, $context = null, array $backtrace = [], string $className = '')
    {
        if (ob_get_length()) {
            ob_clean();
        }
        $data = [
            'message' => 'From ' . $className . ' ' . $message,
            'code' => $code,
            'file' => $file,
            'line' => $line,
            'trace' => $backtrace,
            'context' => $context
        ];

        if (!empty($data['trace'])) {
            foreach ($data['trace'] as $k => $item) {
                if (isset($item['type'])) {
                    switch ($item['type']) {
                        case '->':
                            $data['trace'][$k]['type'] = 'method';
                            break;
                        case '::':
                            $data['trace'][$k]['type'] = 'static method';
                            break;
                        default:
                            $data['trace'][$k]['type'] = 'function';
                    }
                }
            }
        }

        $template = new Native(self::$packageRoot, '', false);
        $content = $template->getContent('catch', $data);
        $response = new Response();
        $response->setStatusCode(418);
        $response->setContent($content);
        $response->send();
        print_r($data);
        exit;
    }
Send response.

@param string $code
@param string $message
@param string $file
@param string $line
@param null $context
@param array $backtrace
@param string $className