Kdyby\Translation\Diagnostics\Panel::renderException PHP Method

renderException() public static method

public static renderException ( $e = NULL )
    public static function renderException($e = NULL)
    {
        if (!$e instanceof InvalidResourceException || !($previous = $e->getPrevious())) {
            return NULL;
        }
        $previous = $previous->getPrevious();
        if (!$previous instanceof Yaml\Exception\ParseException) {
            return NULL;
        }
        $method = 'Symfony\\Component\\Translation\\Loader\\YamlFileLoader::load';
        if ($call = Helpers::findTrace($e->getPrevious()->getTrace(), $method)) {
            return ['tab' => 'YAML dictionary', 'panel' => '<p><b>File:</b> ' . self::editorLink($call['args'][0], $previous->getParsedLine()) . '</p>' . ($previous->getParsedLine() ? BlueScreen::highlightFile($call['args'][0], $previous->getParsedLine()) : '') . '<p>' . $previous->getMessage() . ' </p>'];
        }
    }