org.basex.query.xquery.util
Class Err

java.lang.Object
  extended by org.basex.query.xquery.util.Err

public final class Err
extends java.lang.Object

This class is supposed to support a consistent error output.

Author:
Workgroup DBIS, University of Konstanz 2005-08, ISC License, Christian Gruen

Method Summary
static void cast(Type t, Item it)
          Throws a numeric type exception.
static void cmp(Item it1, Item it2)
          Throws a comparison exception.
static void date(Type t, java.lang.String ex)
          Throws a date format exception.
static void empty(Expr ex)
          Throws a empty sequence exception.
static void nodes(Expr ex)
          Throws a node exception.
static void num(java.lang.String inf, Item it)
          Throws a numeric type exception.
static void or(java.lang.Object[] err, java.lang.Object... x)
          Throws an exception.
static void or(StringList list, java.lang.Object[] err, java.lang.Object... x)
          Throws an exception.
static void range(Type t, byte[] v)
          Throws a date range exception.
static void type(java.lang.String inf, Type t, Item it)
          Throws a type exception.
static void value(Type t, java.lang.Object v)
          Throws an invalid value exception.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

or

public static void or(java.lang.Object[] err,
                      java.lang.Object... x)
               throws XQException
Throws an exception.

Parameters:
err - error message
x - extended info
Throws:
XQException - evaluation exception

or

public static void or(StringList list,
                      java.lang.Object[] err,
                      java.lang.Object... x)
               throws XQException
Throws an exception.

Parameters:
list - code completion list
err - error message
x - extended info
Throws:
XQException - evaluation exception

type

public static void type(java.lang.String inf,
                        Type t,
                        Item it)
                 throws XQException
Throws a type exception.

Parameters:
inf - expression info
t - expected type
it - item
Throws:
XQException - evaluation exception

date

public static void date(Type t,
                        java.lang.String ex)
                 throws XQException
Throws a date format exception.

Parameters:
t - expected type
ex - example format
Throws:
XQException - evaluation exception

value

public static void value(Type t,
                         java.lang.Object v)
                  throws XQException
Throws an invalid value exception.

Parameters:
t - expected type
v - value
Throws:
XQException - evaluation exception

range

public static void range(Type t,
                         byte[] v)
                  throws XQException
Throws a date range exception.

Parameters:
t - expected type
v - value
Throws:
XQException - evaluation exception

empty

public static void empty(Expr ex)
                  throws XQException
Throws a empty sequence exception.

Parameters:
ex - expression
Throws:
XQException - evaluation exception

cmp

public static void cmp(Item it1,
                       Item it2)
                throws XQException
Throws a comparison exception.

Parameters:
it1 - first item
it2 - second item
Throws:
XQException - evaluation exception

num

public static void num(java.lang.String inf,
                       Item it)
                throws XQException
Throws a numeric type exception.

Parameters:
inf - expression info
it - item
Throws:
XQException - evaluation exception

nodes

public static void nodes(Expr ex)
                  throws XQException
Throws a node exception.

Parameters:
ex - expression
Throws:
XQException - evaluation exception

cast

public static void cast(Type t,
                        Item it)
                 throws XQException
Throws a numeric type exception.

Parameters:
t - expression cast type
it - item
Throws:
XQException - evaluation exception