Пример #1
0
    def validate(cls, expression):
        LOG.debug("Validating YAQL expression [expression='%s']", expression)

        try:
            YAQL_ENGINE(expression)
        except (yaql_exc.YaqlException, KeyError, ValueError, TypeError) as e:
            raise exc.YaqlGrammarException(getattr(e, 'message', e))
Пример #2
0
 def validate(cls, expression):
     try:
         YAQL_ENGINE(expression)
     except (yaql_exc.YaqlException, KeyError, ValueError, TypeError) as e:
         raise exc.YaqlGrammarException(getattr(e, 'message', e))
Пример #3
0
 def validate(cls, expression):
     try:
         get_yaql_engine_class()(expression)
     except (yaql_exc.YaqlException, KeyError, ValueError, TypeError) as e:
         raise exc.YaqlGrammarException(getattr(e, 'message', e))