Package com.inet.report
Class ReportException
java.lang.Object
java.lang.Throwable
java.lang.Exception
com.inet.report.ReportException
- All Implemented Interfaces:
com.inet.error.HasErrorCode
,Serializable
- Direct Known Subclasses:
FatalParserException
,KeyNotFoundException
,PageOutOfRangeException
This is the base class of the i-net Clear Reports exception
hierarchy. This exception is thrown whenever an unrecoverable
error occurs within i-net Clear Reports.
- Since:
- 6.0
- See Also:
-
Constructor Summary
ConstructorDescriptionReportException
(String msg, int errorCode) Creates a new report exception.
The message msg is sent to the client viewer with the message number messageId. -
Method Summary
Modifier and TypeMethodDescriptionint
Returns an error code that describes the cause for this exception.Deprecated.toString()
Returns a string which contains the message id and the messageMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
Constructor Details
-
ReportException
Creates a new report exception.
The message msg is sent to the client viewer with the message number messageId. The message string is not translated in any way and you can use any messageId you want if you follow the convention that the java viewer bean interprets negative messageId's as warnings and positive numbers (>0) as errors. The error/warning message is shown by the java viewer bean in the dialog box.
For example you can use this method in the checkProperties() method to send a message to the client:if(prop.getProperty("user", "").equals("peter")) { throw new ReportException("Access denied", 105); }
- Parameters:
msg
- The formatted messageerrorCode
- An integer you can associate with your message and which will be shown by the client. The java client uses the convention that a id<0 is interpreted as a warning and id>0 as an error message.- Since:
- 6.0
-
-
Method Details
-
toString
Returns a string which contains the message id and the message -
setCause
Deprecated.As of i-net Clear Reports 14.1, replaced byThrowable.initCause(Throwable)
Sets the cause for this exception. This is equals to initCause.- Parameters:
cause
- The cause is the throwable that caused this ReportException to get thrown.- Returns:
- a reference to itself.
- Since:
- 6.0
-
getErrorCode
public int getErrorCode()Returns an error code that describes the cause for this exception.- Specified by:
getErrorCode
in interfacecom.inet.error.HasErrorCode
- Returns:
- An error code that describes the cause for this exception.
- Since:
- 6.0
-
Throwable.initCause(Throwable)