org.ucl.xpath
Class DynamicError

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byorg.ucl.xpath.XPathException
              extended byorg.ucl.xpath.DynamicError
All Implemented Interfaces:
java.io.Serializable

public class DynamicError
extends XPathException

Dynamic Error like division by 0 or type errors.

See Also:
Serialized Form

Constructor Summary
DynamicError(java.lang.String code, java.lang.String err)
          Constructor for Dynamic Error.
DynamicError(TypeError te)
          Constructor for Dynamic Error.
 
Method Summary
static DynamicError cant_cast(java.lang.String err)
          Returns the dynamic error.
 java.lang.String code()
          Returns the string of the code.
static DynamicError div_zero(java.lang.String msg)
          Returns the error message when reads a Division by zero
static DynamicError empty_seq(java.lang.String msg)
          Returns the error message
static DynamicError invalid_doc(java.lang.String msg)
          Returns the error message when reads Invalid argument to fn:doc
static DynamicError lexical_error(java.lang.String msg)
          Returns the error message when reads an Invalid lexical value
static DynamicError more_one_item(java.lang.String msg)
          Returns the error message
static DynamicError not_cmp(java.lang.String msg)
          Returns the error message when reads an Items not comparable
static DynamicError not_one(java.lang.String msg)
          Returns the error message
static DynamicError regex_error(java.lang.String err)
          Returns the dynamic error.
static DynamicError throw_type_error()
          Returns the dynamic error.
static DynamicError user_error(java.lang.String err)
          Returns the dynamic error.
 
Methods inherited from class org.ucl.xpath.XPathException
reason
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DynamicError

public DynamicError(java.lang.String code,
                    java.lang.String err)
Constructor for Dynamic Error.

Parameters:
code - is the code that is set.
err - is the reason for the error.

DynamicError

public DynamicError(TypeError te)
Constructor for Dynamic Error.

Parameters:
te - is the error type.
Method Detail

code

public java.lang.String code()
Returns the string of the code.

Returns:
the code.

cant_cast

public static DynamicError cant_cast(java.lang.String err)
Returns the dynamic error.

Parameters:
err - is the error
Returns:
the DynamicError.

throw_type_error

public static DynamicError throw_type_error()
                                     throws DynamicError
Returns the dynamic error.

Returns:
the DynamicError.
Throws:
DynamicError - a Dynamic Error

user_error

public static DynamicError user_error(java.lang.String err)
Returns the dynamic error.

Parameters:
err - is the error
Returns:
the DynamicError.

regex_error

public static DynamicError regex_error(java.lang.String err)
Returns the dynamic error.

Parameters:
err - is the error
Returns:
the DynamicError.

lexical_error

public static DynamicError lexical_error(java.lang.String msg)
Returns the error message when reads an Invalid lexical value

Parameters:
msg - is the message
Returns:
the make_error

not_cmp

public static DynamicError not_cmp(java.lang.String msg)
Returns the error message when reads an Items not comparable

Parameters:
msg - is the message
Returns:
the make_error

more_one_item

public static DynamicError more_one_item(java.lang.String msg)
Returns the error message

Parameters:
msg - is the message
Returns:
the make_error

empty_seq

public static DynamicError empty_seq(java.lang.String msg)
Returns the error message

Parameters:
msg - is the message
Returns:
the make_error

not_one

public static DynamicError not_one(java.lang.String msg)
Returns the error message

Parameters:
msg - is the message
Returns:
the make_error

invalid_doc

public static DynamicError invalid_doc(java.lang.String msg)
Returns the error message when reads Invalid argument to fn:doc

Parameters:
msg - is the message
Returns:
the make_error

div_zero

public static DynamicError div_zero(java.lang.String msg)
Returns the error message when reads a Division by zero

Parameters:
msg - is the message
Returns:
the make_error