com.marklogic.xdbc
Class XDBCXQueryException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended bycom.marklogic.xdbc.XDBCException
              extended bycom.marklogic.xdbc.XDBCXQueryException
All Implemented Interfaces:
Serializable

public class XDBCXQueryException
extends XDBCException

An XDBCXQueryException provides information on an XQuery exception that occurs during XDBC processing.

The information in the XDBCException includes:

See Also:
Serialized Form

Nested Class Summary
static class XDBCXQueryException.Frame
          An XQuery evaluator stack frame.
static class XDBCXQueryException.Variable
          An XQuery evaluator variable binding.
 
Constructor Summary
XDBCXQueryException(String code, String message, String formatString, boolean retryable, String[] data, XDBCXQueryException.Frame[] stack)
          Constructs an XDBCXQueryException
XDBCXQueryException(String code, String message, String formatString, boolean retryable, String expression, String[] data, XDBCXQueryException.Frame[] stack)
          Constructs an XDBCXQueryException
 
Method Summary
 void dump()
          Prints the code, format string, and expression for the exception.
 String getCode()
          Returns the symbolic exception code.
 String[] getData()
          Returns the exception data.
 String getExpression()
          Returns the expression which caused the exception.
 String getFormatString()
          Returns the exception format string.
 boolean getRetryable()
          Returns true if the exception is retryable.
 XDBCXQueryException.Frame[] getStack()
          Returns the XQuery Evaluator stack trace for this XDBCException.
 String toString()
          Returns a string representation of the object.
 
Methods inherited from class com.marklogic.xdbc.XDBCException
getNextException, setNextException
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

XDBCXQueryException

public XDBCXQueryException(String code,
                           String message,
                           String formatString,
                           boolean retryable,
                           String[] data,
                           XDBCXQueryException.Frame[] stack)
Constructs an XDBCXQueryException

Parameters:
code - the symbolic exception code
message - the exception message
formatString - the exception format string
retryable - retrying the operation may succeed
data - the exception data
stack - the xquery evaluator stack trace

XDBCXQueryException

public XDBCXQueryException(String code,
                           String message,
                           String formatString,
                           boolean retryable,
                           String expression,
                           String[] data,
                           XDBCXQueryException.Frame[] stack)
Constructs an XDBCXQueryException

Parameters:
code - the symbolic exception code
message - the exception message
formatString - the exception format string
retryable - retrying the operation may succeed
expression - the expression which caused the exception
data - the exception data
stack - the xquery evaluator stack trace
Method Detail

getCode

public String getCode()
Returns the symbolic exception code.


getFormatString

public String getFormatString()
Returns the exception format string.


getRetryable

public boolean getRetryable()
Returns true if the exception is retryable.

An operation that results in a retryable exeption may succeed upon retrying. For example, certain XDMP-DEADLOCK exceptions might occur while a document is locked, but the document might not be locked the next time the operation is run.


getExpression

public String getExpression()
Returns the expression which caused the exception.


getData

public String[] getData()
Returns the exception data.


getStack

public XDBCXQueryException.Frame[] getStack()
Returns the XQuery Evaluator stack trace for this XDBCException.

Note that this is the server-side stack trace from evaluating the XQuery, NOT the client-side Java runtime stack trace.

Returns:
an array of Frame objects

toString

public String toString()
Returns a string representation of the object.

Overrides:
toString in class XDBCException
Returns:
a string representation of the object.

dump

public void dump()
Prints the code, format string, and expression for the exception.