|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.lang.Throwable
java.lang.Exception
com.businessobjects.customds.exception.DataSourceException
public class DataSourceException
DataSourceException is an exception class that the framework and plug-in use for all the handled exceptions.
This facilitates to control the error messages that are presented to the user.
The major code must be one of the codes mentioned in ErrorCodes with "MAJOR_" as the prefix.
The minor code must be one of the codes mentioned in ErrorCodes with "MINOR_" as the prefix.
Note: The messages in DataSourceException, which are thrown by the Framework, are not localized.
These messages are used only for logging purpose. However, messages apart from custom messages are localized internally before presenting it to the
user. So, if plug-in throws an exception with minorCode as ErrorCodes.MINOR_CUSTOM, it is plug-in's responsibility to pass on the localized message
which will be presented to the user.
As a good practice, Major code should reflect the point where the exception was encountered -
e.g. MAJOR_GET_INFO_ERROR for errors during call to init method, MAJOR_GET_STRUCTURE_ERROR for errors during call to getColumnsInfo method etc.
| Constructor Summary | |
|---|---|
DataSourceException(java.lang.String msg,
int majorCode,
int minorCode)
Class Constructor |
|
DataSourceException(java.lang.Throwable t,
java.lang.String msg,
int majorCode,
int minorCode)
Class Constructor |
|
| Method Summary | |
|---|---|
java.lang.Throwable |
getCause()
Returns the cause of the DataSourceException or null, if the cause is unknown. |
java.lang.Throwable |
getException()
Returns the DataSourceException as a Throwable object. |
int |
getMajorCode()
Internal Use Only |
java.lang.String |
getMessage()
Internal Use Only |
java.lang.String |
getMessage(boolean withStack)
Internal Use Only |
int |
getMinorCode()
Internal Use Only |
java.lang.String |
getStackTraceAsString()
Internal Use Only |
java.lang.String |
toString()
Internal Use Only |
| Methods inherited from class java.lang.Throwable |
|---|
fillInStackTrace, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public DataSourceException(java.lang.String msg,
int majorCode,
int minorCode)
msg - The exception message.majorCode - The major code for DataSourceException.minorCode - The minor code for DataSourceException.
public DataSourceException(java.lang.Throwable t,
java.lang.String msg,
int majorCode,
int minorCode)
t - The java.lang.Throwable object for obtaining the stack trace.msg - The exception message.majorCode - The major code for DataSourceException.minorCode - The minor code for DataSourceException.| Method Detail |
|---|
public java.lang.Throwable getException()
DataSourceException as a Throwable object.
This method facilitates the retrieval of the Throwable object that was
used to create DataSourceException.
Throwable object that was used to create the DataSourceException object,
or DataSourceException as a Throwable object.public java.lang.Throwable getCause()
DataSourceException or null, if the cause is unknown.
This method returns the cause that was supplied either by using one of the constructor with a Throwable object,
or by the initCause(Throwable) method.
getCause in class java.lang.ThrowableDataSourceException or null, if the cause is unknown.public java.lang.String getMessage(boolean withStack)
public java.lang.String getMessage()
getMessage in class java.lang.ThrowableThrowable.getMessage()public int getMinorCode()
public int getMajorCode()
public java.lang.String toString()
toString in class java.lang.Throwablepublic java.lang.String getStackTraceAsString()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||