public static function routeExists($route, sfContext $context)
    {
        try {
            if ($route{0} == '@') {
                $context->getRouting()->generate(substr($route, 1));
            }
            return true;
        } catch (Exception $e) {
            return false;
        }
    }