public function render()
    {
        $this->getPreviewCode();
        $stack = $this->stack;
        //Only for Zest Framework
        if (__config()->config->show_errors === true) {
            $file = 'views/view.php';
            require $file;
        } else {
            $logger = new Logger();
            $log = date('Y-m-d').'.log';
            $message = 'Message: '.$stack['message'];
            $message .= "\n Stack trace: ".$stack['trace'];
            $message .= "\n Thrwo in ".$stack['file'].' '.$stack['line'];
            $logger->setCustomFile($log)->error($message);
            View::View('errors/'.$stack['code']);
        }

        return true;
    }