public function display()
    {
        // hide path root and stip tags from exception message
        $msg = Str::replace(root, '$DOCUMENT_ROOT', $this->getMessage());
        $msg = App::$Security->strip_tags($msg);
        // get message translation
        $this->text = App::$Translate->get('Default', $this->text, ['e' => $msg]);
        
        // if exception is throwed not from html-based environment
        if (env_type !== 'html') {
            if (env_type === 'json') {
                return (new JsonException($msg))->display();
            } else {
                return $this->text;
            }
        }
        
        // add notification in debug bar if exist
        if (App::$Debug !== null) {
            App::$Debug->addException($this);
        }

        // return rendered result
        return $this->buildFakePage();
    }