All Packages Class Hierarchy This Package Previous Next Index
Class jet.bean.JRCatalogException
java.lang.Object
|
+----java.lang.Throwable
|
+----java.lang.Exception
|
+----jet.bean.JRCatalogException
- public class JRCatalogException
- extends Exception
This exception is used when error occurs in the catalog bean.
An exception that provides information on a catalog access
error.
Each JRCatalogException provides several kinds of information:
- an integer error code that indicate what type error occurs.
- a string describing the error.
- a string describing the detail information of the error.
-
CAT_NAME_ERROR
- The catalog name is null.
-
CONNECTION_FAILURE_ERROR
- The JDBC connection failure when try to create a connection to the database.
-
CONNECTION_NAME_ERROR
- The specified name is invalid or already used.
-
CREATE_CAT_ERROR
- Cannot create a catalog in the specified dirctory, because the directory
does not exist or there is catalog in the directory.
-
CREATE_FILEQUERY_FAILED
- Cannot create file query object.
-
FILEQUERY_NAME_ERROR
- The name of file query is either valid or exists.
-
FILEQUERY_NOT_EXISTS
- The specified file query does not exist.
-
LOAD_CAT_ERROR
- Cannot open the specified catalog file.
-
NO_CAT_ERROR
- The loadCatalog() or newCatalog() method should be called before other method is called.
-
NO_CONNECTION_ERROR
- There is no connection in the catalog.
-
ONE_CONNECTION
- A catalog can contains only one connection, and this error is occurs when
adding the second connection.
-
SAVE_CAT_ERROR
- Cannot save the catalog file succuessfully.
-
SYSTEM_INITIALIZE_ERROR
- The system initialize failed.
-
UNKNOWN_ERROR
- The unexpected error.
-
WHERE_PORTION_NOT_EXISTS
- The specified where portion does not exist.
-
WHEREPORTION_NAME_ERROR
- The specified name is invalid or already been used by other where portion.
-
JRCatalogException(int)
- Constructs a
JRCatalogException object with a error code.
-
JRCatalogException(int, String)
- Constructs a fully-specified
JRCatalogException object.
-
getErrorCode()
- Returns the error code.
-
getErrorDetail()
- Gets the detail information of the error.
-
getErrorMessage()
- Returns the error message.
-
getMessage()
- Returns the error message and detail in a string.
SYSTEM_INITIALIZE_ERROR
public static final int SYSTEM_INITIALIZE_ERROR
- The system initialize failed. The JRCatalog need to be initialized to resolve
the environment. This error is caused by some reason like wrong report home,
bad installation.
CAT_NAME_ERROR
public static final int CAT_NAME_ERROR
- The catalog name is null. The catalog name should be set before the loadReport() or newReport() is called.
CREATE_CAT_ERROR
public static final int CREATE_CAT_ERROR
- Cannot create a catalog in the specified dirctory, because the directory
does not exist or there is catalog in the directory.
LOAD_CAT_ERROR
public static final int LOAD_CAT_ERROR
- Cannot open the specified catalog file. The reason is file not found, file corrupt,
format error or version mismatch.
The detail information describe the reason why catalog file open failed.
SAVE_CAT_ERROR
public static final int SAVE_CAT_ERROR
- Cannot save the catalog file succuessfully. The reason is file writing error
or formula file save failed.
The detail information describe the reason.
NO_CAT_ERROR
public static final int NO_CAT_ERROR
- The loadCatalog() or newCatalog() method should be called before other method is called.
And the closeCatalog() should be called in the end.
WHEREPORTION_NAME_ERROR
public static final int WHEREPORTION_NAME_ERROR
- The specified name is invalid or already been used by other where portion.
WHERE_PORTION_NOT_EXISTS
public static final int WHERE_PORTION_NOT_EXISTS
- The specified where portion does not exist.
ONE_CONNECTION
public static final int ONE_CONNECTION
- A catalog can contains only one connection, and this error is occurs when
adding the second connection.
CONNECTION_NAME_ERROR
public static final int CONNECTION_NAME_ERROR
- The specified name is invalid or already used.
CONNECTION_FAILURE_ERROR
public static final int CONNECTION_FAILURE_ERROR
- The JDBC connection failure when try to create a connection to the database.
The detail information describes the message of SQLException or ClassNotFoundException.
FILEQUERY_NAME_ERROR
public static final int FILEQUERY_NAME_ERROR
- The name of file query is either valid or exists.
CREATE_FILEQUERY_FAILED
public static final int CREATE_FILEQUERY_FAILED
- Cannot create file query object.
The detail information describe the reason.
NO_CONNECTION_ERROR
public static final int NO_CONNECTION_ERROR
- There is no connection in the catalog.
If you are deleting or modifying the connection, the problem is no connection exists at all.
If you are adding file query, the problem is you can not create file query without a connection.
FILEQUERY_NOT_EXISTS
public static final int FILEQUERY_NOT_EXISTS
- The specified file query does not exist.
UNKNOWN_ERROR
public static final int UNKNOWN_ERROR
- The unexpected error.
JRCatalogException
public JRCatalogException(int iErrorCode)
- Constructs a
JRCatalogException object with a error code.
- Parameters:
- iErrorCode, - the code of the error.
JRCatalogException
public JRCatalogException(int iErrorCode,
String strDetail)
- Constructs a fully-specified
JRCatalogException object.
- Parameters:
- iErrorCode, - the code of the error.
- strDetail, - the detail information
getMessage
public String getMessage()
- Returns the error message and detail in a string.
- Returns:
- the message.
- Overrides:
- getMessage in class Throwable
getErrorCode
public int getErrorCode()
- Returns the error code.
- Returns:
- the error code.
getErrorMessage
public String getErrorMessage()
- Returns the error message.
- Returns:
- the error message.
getErrorDetail
public String getErrorDetail()
- Gets the detail information of the error.
- Returns:
- the detail information.
All Packages Class Hierarchy This Package Previous Next Index