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
,java.io.Serializable
- Direct Known Subclasses:
FatalParserException
,KeyNotFoundException
,PageOutOfRangeException
public class ReportException extends java.lang.Exception implements com.inet.error.HasErrorCode
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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ReportException(java.lang.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
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description int
getErrorCode()
Returns an error code that describes the cause for this exception.ReportException
setCause(java.lang.Throwable cause)
Deprecated.As of i-net Clear Reports 14.1, replaced byThrowable.initCause(Throwable)
java.lang.String
toString()
Returns a string which contains the message id and the message
-
-
-
Constructor Detail
-
ReportException
public ReportException(java.lang.String msg, int errorCode)
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 Detail
-
toString
public java.lang.String toString()
Returns a string which contains the message id and the message- Overrides:
toString
in classjava.lang.Throwable
- Returns:
- String
- Since:
- 6.0
-
setCause
@Deprecated public ReportException setCause(java.lang.Throwable cause)
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
-
-