Klasse ReportException

Alle implementierten Schnittstellen:
com.inet.error.HasErrorCode, Serializable
Bekannte direkte Unterklassen:
FatalParserException, KeyNotFoundException, PageOutOfRangeException

public class ReportException extends 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.
Seit:
6.0
Siehe auch:
  • Konstruktordetails

    • ReportException

      public ReportException(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);
      }
      Parameter:
      msg - The formatted message
      errorCode - 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.
      Seit:
      6.0
  • Methodendetails

    • toString

      public String toString()
      Returns a string which contains the message id and the message
      Setzt außer Kraft:
      toString in Klasse Throwable
      Gibt zurück:
      String
      Seit:
      6.0
    • setCause

      @Deprecated public ReportException setCause(Throwable cause)
      Veraltet.
      As of i-net Clear Reports 14.1, replaced by Throwable.initCause(Throwable)
      Sets the cause for this exception. This is equals to initCause.
      Parameter:
      cause - The cause is the throwable that caused this ReportException to get thrown.
      Gibt zurück:
      a reference to itself.
      Seit:
      6.0
    • getErrorCode

      public int getErrorCode()
      Returns an error code that describes the cause for this exception.
      Angegeben von:
      getErrorCode in Schnittstelle com.inet.error.HasErrorCode
      Gibt zurück:
      An error code that describes the cause for this exception.
      Seit:
      6.0