public static function stop($code, $msg = null)
    {
        Response::status($code, false) && self::trigger('changestatus', array($code, $msg));

        if (self::$state < 4) {
            self::$state = 4;
            self::trigger('finish');
        }

        exit;
    }