private function getViewFileForException($exception)
    {
        $basePath = \Reaction::$app->getAlias('@views/error');
        $tplName = 'general.php';
        if ($exception instanceof HttpExceptionInterface) {
            $code = $exception->statusCode;
        } else {
            $code = $exception->getCode();
        }
        if (file_exists($basePath . '/' . $code . '.php')) {
            $tplName = $code . '.php';
        }
        return $basePath . '/' . $tplName;
    }