01: package org.enhydra.shark.api.client.wfbase;
02:
03: import org.enhydra.shark.api.*;
04:
05: /**
06: * Java implementation of OMG defined exception. This is how OMG defines it:
07: * <p>
08: * BaseException is an exception that holds a sequence of BaseError structures -
09: * essentially a sequence of exceptions. The sequence is a push-down list so that the most
10: * recently occurring exception is first. This allows multiple exceptions to be returned so
11: * that multiple problems may be addressed, as where a user has a number of data entry
12: * errors or where consequential errors are recorded as a result of a low-level exception.
13: * The BaseException is returned by all operations defined in this specification to
14: * support implementations of the WfM Facility to raise implementation specific
15: * exceptions.
16: * <p>
17: * Our implementation is adapted for Java. Although we implemented possibility
18: * to be used as defined, we extended this exception from our RootException class,
19: * which allows us chaining exceptions, and in shark we use it only that way.
20: */
21: public final class BaseException extends RootException {
22: public BaseError errors[] = null;
23:
24: public BaseException() {
25: super ();
26: } // ctor
27:
28: public BaseException(BaseError[] _errors) {
29: super ();
30: errors = _errors;
31: } // ctor
32:
33: public BaseException(String $reason, BaseError[] _errors) {
34: super ($reason);
35: errors = _errors;
36: } // ctor
37:
38: public BaseException(String message) {
39: super (message);
40: }
41:
42: public BaseException(Throwable cause) {
43: super (cause);
44: }
45:
46: public BaseException(String message, Throwable cause) {
47: super (message, cause);
48: }
49: } // class BaseException
|