Exemplo n.º 1
0
 /**
  * Performs the fail function.
  *
  * @param ctx query context
  * @return resulting value
  * @throws QueryException query exception
  */
 private Item fail(final QueryContext ctx) throws QueryException {
   throw UNIT_MESSAGE.thrw(info, checkStr(expr[0], ctx));
 }
Exemplo n.º 2
0
 /**
  * Performs the assert function.
  *
  * @param ctx query context
  * @return resulting value
  * @throws QueryException query exception
  */
 private Item assrt(final QueryContext ctx) throws QueryException {
   final byte[] str = expr.length < 2 ? null : checkStr(expr[1], ctx);
   if (expr[0].ebv(ctx, info).bool(info)) return null;
   throw str == null ? UNIT_ASSERT.thrw(info) : UNIT_MESSAGE.thrw(info, str);
 }