Business Objects
Quark Platform Documentation
Version 1.7.0_0
Business Objects

org.openquark.cal.runtime
Class CALExecutorException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by org.openquark.cal.runtime.CALExecutorException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
CALExecutorException.ExternalException, CALExecutorException.InternalException

public abstract class CALExecutorException
extends Exception

Base class for exceptions involved in evaluating CAL code.

The exception hierarchy is divided into two main branches, one for external exceptions and one for internal exceptions.

Internal exceptions are errors in the implementation of CAL, or errors in setting up the CAL services calls to activate the run-time i.e. they are not caused by the correct operation of the running CAL code.

External exceptions are errors in a CAL program. External errors can originate in several ways (currently).

  1. A call to the CAL Prelude.error function.
  2. A foreign function an exception.
  3. An arithmetic exception, such as divide by zero, occurs in evaluating the CAL code.
  4. A pattern matching failure, such as (case Just 10.0 of Nothing -> "ok";) or (Left 2.0 :: Either Double Double).Right.value

See Also:
Serialized Form

Nested Class Summary
static class CALExecutorException.ExternalException
          A base class for external exceptions.
static class CALExecutorException.InternalException
          Base class for Internal exceptions.
static class CALExecutorException.Type
          Enum for the different types of exceptions.
 
Constructor Summary
CALExecutorException(ErrorInfo errorInfo, String message, Throwable cause)
          Construct an exception with the given message and associate it with the given Executor and originating exception.
CALExecutorException(String message)
          Construct an exception with the given message and associate it with the given Executor and originating exception.
CALExecutorException(String message, Throwable cause)
          Construct an exception with the given message and associate it with the given Executor and originating exception.
 
Method Summary
 ErrorInfo getErrorInfo()
           
 CALExecutorException.Type getExceptionType()
          Get the execution result status.
 String getMessage()
          Retrieve the message associated with this exception.
abstract  boolean isExternal()
          Return true if this is an external exception (i.e. an error was generated by the CAL source program)
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CALExecutorException

public CALExecutorException(String message)
Construct an exception with the given message and associate it with the given Executor and originating exception.

Parameters:
message - String

CALExecutorException

public CALExecutorException(String message,
                            Throwable cause)
Construct an exception with the given message and associate it with the given Executor and originating exception.

Parameters:
message - String
cause - Throwable

CALExecutorException

public CALExecutorException(ErrorInfo errorInfo,
                            String message,
                            Throwable cause)
Construct an exception with the given message and associate it with the given Executor and originating exception.

Parameters:
errorInfo - Information that associates the error with the source code. Maybe null.
message - String
cause - Throwable
Method Detail

getErrorInfo

public ErrorInfo getErrorInfo()
Returns:
Provides information about where the error call appears in the source file. This may be null.

isExternal

public abstract boolean isExternal()
Return true if this is an external exception (i.e. an error was generated by the CAL source program)

Returns:
boolean

getMessage

public String getMessage()
Retrieve the message associated with this exception. The chain of originating exceptions is walked and their messages are included.

Overrides:
getMessage in class Throwable
Returns:
String

getExceptionType

public final CALExecutorException.Type getExceptionType()
Get the execution result status. Call this to determine the result status when the execution has been terminated. Note: the runtime must still be available.

Returns:
the type of the exception

Business Objects
Quark Platform Documentation
Version 1.7.0_0
Business Objects

Copyright © 2007 Business Objects. All rights reserved.