Skip navigation links

Oracle® Database XML Java API Reference 11g Release 2 (11.2) E10769-01

## oracle.xml.sql
Class OracleXMLSQLException

`java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
oracle.xml.sql.OracleXMLSQLException`

All Implemented Interfaces:
  java.io.Serializable

Direct Known Subclasses:
  OracleXMLSQLNoRowsException

      public class OracleXMLSQLException

extends java.lang.RuntimeException

The `OracleXMLSQLException` class is the generic runtime exception thrown by the XSU.

See Also:
  Serialized Form

Constructor Summary
`OracleXMLSQLException(java.lang.Exception parentE)` Constructor for the `OracleXMLSQLException` object.
`OracleXMLSQLException(java.lang.Exception parentE, java.lang.String errorTag)` Constructor for the `OracleXMLSQLException` object.
`OracleXMLSQLException(java.lang.String message)` Constructor for the `OracleXMLSQLException` object.
`OracleXMLSQLException(java.lang.String message, java.lang.Exception parentE)` Constructor for the `OracleXMLSQLException` object.
`OracleXMLSQLException(java.lang.String message, java.lang.Exception parentE, boolean combine)` Constructor for the `OracleXMLSQLException` object.
`OracleXMLSQLException(java.lang.String message, java.lang.Exception parentE, java.lang.String errorTag)` Constructor for the `OracleXMLSQLException` object.
`OracleXMLSQLException(java.lang.String message, int sqlErrorCode)` Constructor for the `OracleXMLSQLException` object.
`OracleXMLSQLException(java.lang.String message, int sqlErrorCode, java.lang.String errorTag)` Constructor for the `OracleXMLSQLException` object.
`OracleXMLSQLException(java.lang.String message, java.lang.String errorTag)` Constructor for the `OracleXMLSQLException` object.

Method Summary
`int` `getErrorCode()` This function gets the SQL error code
`java.lang.Exception` `getParentException()` Returns the original exception it if exists; otherwise, returns `null`.
`java.lang.String` `getXMLErrorString()` Prints the XML error message and error tag name as a `String`.
`java.lang.String` `getXMLSQLErrorString()` Prints the SQL error message and error parameters as a `String`.
`void` `setErrorTag(java.lang.String errorTag)` Sets the error tag name that is subsequently used by `getXMLErrorString` and `getXMLSQLErrorString` methods to generate XML error reports.

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

### OracleXMLSQLException

    public OracleXMLSQLException(java.lang.Exception parentE)

  Constructor for the `OracleXMLSQLException` object.
  Parameters:
    `parentE` - Parent exception

### OracleXMLSQLException

    public OracleXMLSQLException(java.lang.Exception parentE,
                                 java.lang.String errorTag)

  Constructor for the `OracleXMLSQLException` object.
  Parameters:
    `parentE` - Parent exception
    `errorTag` - Name of error Tag

### OracleXMLSQLException

    public OracleXMLSQLException(java.lang.String message,
                                 java.lang.Exception parentE,
                                 boolean combine)

  Constructor for the `OracleXMLSQLException` object.
  Parameters:
    `message` - The error message string
    `parentE` - Parent exception
    `combine` - combine the given message with the exception msg?

### OracleXMLSQLException

    public OracleXMLSQLException(java.lang.String message,
                                 java.lang.Exception parentE)

  Constructor for the `OracleXMLSQLException` object.
  Parameters:
    `message` - The error message string
    `parentE` - Parent exception

### OracleXMLSQLException

    public OracleXMLSQLException(java.lang.String message,
                                 java.lang.Exception parentE,
                                 java.lang.String errorTag)

  Constructor for the `OracleXMLSQLException` object.
  Parameters:
    `message` - The error message string
    `parentE` - Parent exception
    `errorTag` - The name of the error tag

### OracleXMLSQLException

    public OracleXMLSQLException(java.lang.String message)

  Constructor for the `OracleXMLSQLException` object.
  Parameters:
    `message` - The error message string

### OracleXMLSQLException

    public OracleXMLSQLException(java.lang.String message,
                                 java.lang.String errorTag)

  Constructor for the `OracleXMLSQLException` object.
  Parameters:
    `message` - The error message string
    `errorTag` - The name of the error tag

### OracleXMLSQLException

    public OracleXMLSQLException(java.lang.String message,
                                 int sqlErrorCode)

  Constructor for the `OracleXMLSQLException` object.
  Parameters:
    `message` - The error message string
    `sqlErrorCode` - The SQL error code

### OracleXMLSQLException

    public OracleXMLSQLException(java.lang.String message,
                                 int sqlErrorCode,
                                 java.lang.String errorTag)

  Constructor for the `OracleXMLSQLException` object.
  Parameters:
    `message` - The error message string
    `sqlErrorCode` - The SQL error code
    `errorTag` - The name of the error tag

Method Detail

### getXMLErrorString

    public java.lang.String getXMLErrorString()

  Prints the XML error message and error tag name as a `String`.
  Returns:
    The Error as a string

### getXMLSQLErrorString

    public java.lang.String getXMLSQLErrorString()

  Prints the SQL error message and error parameters as a `String`.
  Returns:
    The error massage and error parameters as a string

### getParentException

    public java.lang.Exception getParentException()

  Returns the original exception it if exists; otherwise, returns `null`.
  Returns:
    The original exception, or NULL of one doesn't exist

### setErrorTag

    public void setErrorTag(java.lang.String errorTag)

  Sets the error tag name that is subsequently used by `getXMLErrorString` and `getXMLSQLErrorString` methods to generate XML error reports.
  Parameters:
    `errorTag` - The name of the error tag.

### getErrorCode

    public int getErrorCode()

  This function gets the SQL error code
  Returns:
    The SQL error code

Skip navigation links

Oracle® Database XML Java API Reference 11g Release 2 (11.2) E10769-01

Copyright © 2003, 2009, Oracle and/or its affiliates. All rights reserved.