com.dynalivery.pcre
Class PCREAPIError

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--com.dynalivery.pcre.PCREError
                    |
                    +--com.dynalivery.pcre.PCREServiceError
                          |
                          +--com.dynalivery.pcre.PCREAPIError

public class PCREAPIError
extends PCREServiceError

A PCREAPIError indicates that the report engine on the server has indicated a failure condition. This is equivalent to a CRPE API call returning 'FALSE'. The PCREAPIError object also gives the error code and error text resulting from the failed call.

This exception merely indicates that the API call has failed. (For example, trying to open a non-existant report with OpenJob() would result in a PCREAPIError being thrown)

See Also:
Serialized Form

Fields inherited from class com.dynalivery.pcre.PCREError
errorCode, errorKind, errorText
 
Constructor Summary
PCREAPIError(int code, java.lang.String text)
          Construct a PCREAPIError with the given code and text.
PCREAPIError(java.lang.String text)
          Construct a PCREAPIError with the given text and default code.
 
Method Summary
 void Report()
          Report this error in the client.
static void Report(int code, java.lang.String text)
          Generate and report a command error in the client.
static void Report(java.lang.String text)
          Generate and report a command error in the client.
 void Throw()
          Throw this error to a handler in the client.
static void Throw(int code, java.lang.String text)
          Generate and throw a api error in the client.
static void Throw(java.lang.String text)
          Generate and throw a api error in the client.
 
Methods inherited from class com.dynalivery.pcre.PCREError
getCode, getKind, getText
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PCREAPIError

public PCREAPIError(int code,
                    java.lang.String text)
Construct a PCREAPIError with the given code and text.
Parameters:
code - The error code
text - The error text

PCREAPIError

public PCREAPIError(java.lang.String text)
Construct a PCREAPIError with the given text and default code.
Parameters:
text - The error text
Method Detail

Report

public void Report()
Report this error in the client.
Overrides:
Report in class PCREServiceError

Report

public static void Report(int code,
                          java.lang.String text)
Generate and report a command error in the client.
Parameters:
code - The error code to use
text - The error text to use

Report

public static void Report(java.lang.String text)
Generate and report a command error in the client.
Parameters:
text - The text to create the error with

Throw

public void Throw()
           throws PCREAPIError
Throw this error to a handler in the client.
Overrides:
Throw in class PCREServiceError
Throws:
PCREAPIError - exception.

Throw

public static void Throw(int code,
                         java.lang.String text)
                  throws PCREAPIError
Generate and throw a api error in the client.
Parameters:
code - The error code that is to be thrown with the exception
text - The error description that is to be thrown with the exception
Throws:
PCREAPIError - exception.

Throw

public static void Throw(java.lang.String text)
                  throws PCREAPIError
Generate and throw a api error in the client.
Parameters:
text - The error description that is to be thrown with the exception
Throws:
PCREAPIError - exception.