|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.lang.Throwable
java.lang.Exception
java.sql.SQLException
org.olap4j.OlapException
public class OlapException
An exception describing an error accessing an OLAP database.
Since olap4j extends JDBC, it is natural that OlapException
should extend JDBC's SQLException. The implementation by an olap4j
driver of a JDBC method which is declared to throw a SQLException may, if the
driver chooses, throw instead an OlapException.
OlapException provides some additional information to help an OLAP client identify the location of the error. This information is
| Nested Class Summary | |
|---|---|
static class |
OlapException.Region
Description of the position of a syntax or validation error in the source MDX string. |
| Constructor Summary | |
|---|---|
OlapException()
Constructs an SQLException object;
the reason field defaults to null,
the sqlState field defaults to null, and
the vendorCode field defaults to 0. |
|
OlapException(java.lang.String reason)
Constructs an SQLException object with a reason;
the sqlState field defaults to null, and
the vendorCode field defaults to 0. |
|
OlapException(java.lang.String reason,
java.lang.String sqlState)
Constructs an SQLException object with the given reason and
SQLState; the vendorCode field defaults to 0. |
|
OlapException(java.lang.String reason,
java.lang.String sqlState,
int vendorCode)
Constructs a fully-specified SQLException object. |
|
OlapException(java.lang.String reason,
java.lang.Throwable cause)
Constructs an OlapException object with a given
reason and cause. |
|
| Method Summary | |
|---|---|
java.lang.Object |
getContext()
Returns the context where the exception occurred. |
OlapException.Region |
getRegion()
Returns the textual region where the exception occurred, or null if no region can be identified. |
void |
setContext(java.lang.Object context)
Sets the context where the exception occurred. |
void |
setRegion(OlapException.Region region)
Sets the textual region where the exception occurred. |
| Methods inherited from class java.sql.SQLException |
|---|
getErrorCode, getNextException, getSQLState, iterator, setNextException |
| 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 |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public OlapException(java.lang.String reason,
java.lang.String sqlState,
int vendorCode)
SQLException object.
reason - a description of the exceptionsqlState - an XOPEN or SQL 99 code identifying the exceptionvendorCode - a database vendor-specific exception code
public OlapException(java.lang.String reason,
java.lang.String sqlState)
SQLException object with the given reason and
SQLState; the vendorCode field defaults to 0.
reason - a description of the exceptionsqlState - an XOPEN or SQL 99 code identifying the exceptionpublic OlapException(java.lang.String reason)
SQLException object with a reason;
the sqlState field defaults to null, and
the vendorCode field defaults to 0.
reason - a description of the exceptionpublic OlapException()
SQLException object;
the reason field defaults to null,
the sqlState field defaults to null, and
the vendorCode field defaults to 0.
public OlapException(java.lang.String reason,
java.lang.Throwable cause)
OlapException object with a given
reason and cause.
reason - the detail message (which is saved for later retrieval
by the Throwable.getMessage() method).cause - the cause (which is saved for later retrieval by the
Throwable.getCause() method). (A null value is
permitted, and indicates that the cause is nonexistent or
unknown.)| Method Detail |
|---|
public void setRegion(OlapException.Region region)
region - Textual regionpublic OlapException.Region getRegion()
public void setContext(java.lang.Object context)
context - Context where the exception occurred
java.lang.IllegalArgumentException - If context is not a Cell
or a Positionpublic java.lang.Object getContext()
Cell or a Position, or null.
|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||