示例#1
0
 /**
  * Creates the error message from the specified text and extension array.
  *
  * @param text text message with optional placeholders
  * @param ext info extensions
  * @return argument
  */
 private static String message(final String text, final Object[] ext) {
   final int es = ext.length;
   for (int e = 0; e < es; e++) {
     if (ext[e] instanceof ExprInfo) ext[e] = chop(((ExprInfo) ext[e]).toErrorString(), null);
   }
   return Util.info(text, ext);
 }
示例#2
0
 /**
  * Creates an exception with the specified message.
  *
  * @param msg message
  * @param ext error extension
  * @return exception
  * @throws QueryException query exception
  */
 QueryException error(final String msg, final Object... ext) throws QueryException {
   throw new QueryException(function.info, Err.BASX_RESTXQ, Util.info(msg, ext));
 }