com.dynalivery.harmoni
Class HarmoniAPIError

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--com.dynalivery.harmoni.HarmoniError
                    |
                    +--com.dynalivery.harmoni.HarmoniServiceError
                          |
                          +--com.dynalivery.harmoni.HarmoniAPIError

public class HarmoniAPIError
extends HarmoniServiceError

A HarmoniAPIError indicates that the report engine on the server has indicated a failure condition. This is equivalent to a CRPE API call returning 'FALSE'. The HarmoniAPIError 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 HarmoniAPIError being thrown)

See Also:
Serialized Form

Fields inherited from class com.dynalivery.harmoni.HarmoniError
errorCode, errorKind, errorText
 
Constructor Summary
HarmoniAPIError(int code, java.lang.String text)
          Construct a HarmoniAPIError with the given code and text.
HarmoniAPIError(java.lang.String text)
          Construct a HarmoniAPIError 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.harmoni.HarmoniError
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

HarmoniAPIError

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

HarmoniAPIError

public HarmoniAPIError(java.lang.String text)
Construct a HarmoniAPIError 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 HarmoniServiceError

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 HarmoniAPIError
Throw this error to a handler in the client.
Overrides:
Throw in class HarmoniServiceError
Throws:
HarmoniAPIError - exception.

Throw

public static void Throw(int code,
                         java.lang.String text)
                  throws HarmoniAPIError
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:
HarmoniAPIError - exception.

Throw

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