Data Request Broker
2-3-release

fr.gael.drb.query
Class DynamicException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by fr.gael.drb.query.DynamicException
All Implemented Interfaces:
Serializable

public class DynamicException
extends RuntimeException

Dynamic error of an XQuery dynamic evalutation phase. A dynamic error is an error that must be detected during the evaluation phase and may be detected during the analysis phase. Numeric overflow is an example of a dynamic error.

See Also:
Serialized Form

Constructor Summary
protected DynamicException(fr.gael.drb.query.Expression expression, String message)
          Builds a dynamic exception with a contextual message.
 
Method Summary
 int getBeginColumn()
          Returns the column number where the dynamic error has started.
 int getBeginLine()
          Returns the line number where the dynamic error has stared.
 int getEndColumn()
          Returns the column number where the dynamic error has ended.
 int getEndLine()
          Returns the line number where the dynamic error has ended.
 String getMessage()
          Returns the exception message.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, 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

DynamicException

protected DynamicException(fr.gael.drb.query.Expression expression,
                           String message)
Builds a dynamic exception with a contextual message.

Parameters:
expression - the expression associated to the error.
message - the contextual message that should fit in the sentence " at line l, column c.". It shall therefore, be a single line message whith no trailing sign or symbol (e.g. no trailing point, comma or question mark).
Method Detail

getBeginLine

public int getBeginLine()
Returns the line number where the dynamic error has stared.

Returns:
line the error started.

getEndLine

public int getEndLine()
Returns the line number where the dynamic error has ended.

Returns:
line the error ended.

getBeginColumn

public int getBeginColumn()
Returns the column number where the dynamic error has started.

Returns:
column the error started.

getEndColumn

public int getEndColumn()
Returns the column number where the dynamic error has ended.

Returns:
line the error ended.

getMessage

public String getMessage()
Returns the exception message. An example of output message would be:
 Dynamic error in FLWOR expression at line 1, column 26.
 The $a variable has already been declared.
 
It is a committment that the output message ends with a trailing ".".

Overrides:
getMessage in class Throwable
Returns:
the exception message.

Data Request Broker - DRB API®
2-3-release

Copyright© 2001-2009 GAEL Consultant. All rights reserved. Use is subject to license terms .