public static function exceptionHandler($e)
    {

        $message = 'Code: ' . $e->getCode() . "\n" .
                'Path: ' . \sb\Gateway::$request->path . "\n" .
                'Message: ' . $e->getMessage() . "\n" .
                'Location: ' . $e->getFile() . "\n" .
                'Line: ' . $e->getLine() . "\n";
                if(isset(\sb\Gateway::$request)){
                    $message .= 'Request: '.\sb\Gateway::$request->request."\n";
                    if(isset(\sb\Gateway::$request->method)){
                        $message .= 'Method: '.\sb\Gateway::$request->method."\n";
                    }
                    
                    if(count(\sb\Gateway::$request->get)){
                        $message .= 'Get: '.http_build_query(\sb\Gateway::$request->get) ."\n";
                    }
                }

        if (self::$show_trace) {
            $message .= "Trace: \n\t" . str_replace("\n", "\n\t", \print_r($e->getTrace(), 1));
        }

        if (\method_exists("\App", "exception_handler")) {
            if (\App::exceptionHandler($e, $message) === false) {
                return false;
            }
        }

        if (\ini_get("display_errors") == true) {
            if (\sb\Gateway::$command_line) {
                \file_put_contents('php://stderr', "\n" . $message  . "\n");
            } else {
                echo '<pre style="background-color:red;padding:10px;color:#FFF;">' . $message . '</pre>';
            }
        }

        if (!isset(\App::$logger)) {
            \App::$logger = new \sb\Logger\FileSystem();
        }

        \App::$logger->exceptions($message);

    }