public class ReportException
extends java.lang.Exception
implements com.inet.error.HasErrorCode
| Constructor and Description |
|---|
ReportException(java.lang.String msg,
int errorCode)
Creates a new report exception.
|
| Modifier and Type | Method and 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 by
Throwable.initCause(Throwable) |
java.lang.String |
toString()
Returns a string which contains the message id and the message
|
public ReportException(java.lang.String msg,
int errorCode)
if(prop.getProperty("user", "").equals("peter")) {
throw new ReportException("Access denied", 105);
}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.public java.lang.String toString()
toString in class java.lang.Throwable@Deprecated public ReportException setCause(java.lang.Throwable cause)
Throwable.initCause(Throwable)cause - The cause is the throwable that caused this ReportException to get thrown.public int getErrorCode()
Copyright © 1999-2020 by i-net software GmbH