Data Request Broker
2-3-release

fr.gael.drb.query
Class TypeException

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

public class TypeException
extends RuntimeException

Type exception of an XQuery static analysis or dynamic evalutation phases.

See Also:
Serialized Form

Constructor Summary
protected TypeException(fr.gael.drb.query.Expression expression, String message)
          Builds a type exception with a contextual message.
 
Method Summary
 int getBeginColumn()
          Returns the column number where the type error has started.
 int getBeginLine()
          Returns the line number where the type error has stared.
 int getEndColumn()
          Returns the column number where the type error has ended.
 int getEndLine()
          Returns the line number where the type 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

TypeException

protected TypeException(fr.gael.drb.query.Expression expression,
                        String message)
Builds a type exception with a contextual message. This constructor is dedicated to exceptions raised during the dynamic evaluation phase.

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 type error has stared.

Returns:
line the error started.

getEndLine

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

Returns:
line the error ended.

getBeginColumn

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

Returns:
column the error started.

getEndColumn

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

Returns:
line the error ended.

getMessage

public String getMessage()
Returns the exception message. An example of output message would be:
 Type error in FLWOR expression at line 1, column 26.
 The $a variable has an invalid type.
 
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 .