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:


Variable Index

 o CAT_NAME_ERROR
The catalog name is null.
 o CONNECTION_FAILURE_ERROR
The JDBC connection failure when try to create a connection to the database.
 o CONNECTION_NAME_ERROR
The specified name is invalid or already used.
 o CREATE_CAT_ERROR
Cannot create a catalog in the specified dirctory, because the directory does not exist or there is catalog in the directory.
 o CREATE_FILEQUERY_FAILED
Cannot create file query object.
 o FILEQUERY_NAME_ERROR
The name of file query is either valid or exists.
 o FILEQUERY_NOT_EXISTS
The specified file query does not exist.
 o LOAD_CAT_ERROR
Cannot open the specified catalog file.
 o NO_CAT_ERROR
The loadCatalog() or newCatalog() method should be called before other method is called.
 o NO_CONNECTION_ERROR
There is no connection in the catalog.
 o ONE_CONNECTION
A catalog can contains only one connection, and this error is occurs when adding the second connection.
 o SAVE_CAT_ERROR
Cannot save the catalog file succuessfully.
 o SYSTEM_INITIALIZE_ERROR
The system initialize failed.
 o UNKNOWN_ERROR
The unexpected error.
 o WHERE_PORTION_NOT_EXISTS
The specified where portion does not exist.
 o WHEREPORTION_NAME_ERROR
The specified name is invalid or already been used by other where portion.

Constructor Index

 o JRCatalogException(int)
Constructs a JRCatalogException object with a error code.
 o JRCatalogException(int, String)
Constructs a fully-specified JRCatalogException object.

Method Index

 o getErrorCode()
Returns the error code.
 o getErrorDetail()
Gets the detail information of the error.
 o getErrorMessage()
Returns the error message.
 o getMessage()
Returns the error message and detail in a string.

Variables

 o 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.

 o 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.

 o 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.

 o 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.

 o 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.

 o 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.

 o WHEREPORTION_NAME_ERROR
 public static final int WHEREPORTION_NAME_ERROR
The specified name is invalid or already been used by other where portion.

 o WHERE_PORTION_NOT_EXISTS
 public static final int WHERE_PORTION_NOT_EXISTS
The specified where portion does not exist.

 o 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.

 o CONNECTION_NAME_ERROR
 public static final int CONNECTION_NAME_ERROR
The specified name is invalid or already used.

 o 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.

 o FILEQUERY_NAME_ERROR
 public static final int FILEQUERY_NAME_ERROR
The name of file query is either valid or exists.

 o CREATE_FILEQUERY_FAILED
 public static final int CREATE_FILEQUERY_FAILED
Cannot create file query object. The detail information describe the reason.

 o 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.

 o FILEQUERY_NOT_EXISTS
 public static final int FILEQUERY_NOT_EXISTS
The specified file query does not exist.

 o UNKNOWN_ERROR
 public static final int UNKNOWN_ERROR
The unexpected error.

Constructors

 o JRCatalogException
 public JRCatalogException(int iErrorCode)
Constructs a JRCatalogException object with a error code.

Parameters:
iErrorCode, - the code of the error.
 o JRCatalogException
 public JRCatalogException(int iErrorCode,
                           String strDetail)
Constructs a fully-specified JRCatalogException object.

Parameters:
iErrorCode, - the code of the error.
strDetail, - the detail information

Methods

 o getMessage
 public String getMessage()
Returns the error message and detail in a string.

Returns:
the message.
Overrides:
getMessage in class Throwable
 o getErrorCode
 public int getErrorCode()
Returns the error code.

Returns:
the error code.
 o getErrorMessage
 public String getErrorMessage()
Returns the error message.

Returns:
the error message.
 o getErrorDetail
 public String getErrorDetail()
Gets the detail information of the error.

Returns:
the detail information.

All Packages  Class Hierarchy  This Package  Previous  Next  Index