01: /**
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */package org.apache.openejb;
17:
18: import java.util.List;
19: import java.util.ArrayList;
20: import java.io.PrintStream;
21: import java.io.PrintWriter;
22:
23: /**
24: * @version $Rev: 602704 $ $Date: 2007-12-09 09:58:22 -0800 $
25: */
26: public class UndeployException extends OpenEJBException {
27:
28: private final List<Throwable> causes = new ArrayList<Throwable>();
29:
30: public UndeployException() {
31: }
32:
33: public UndeployException(String message) {
34: super (message);
35: }
36:
37: public UndeployException(String message, Throwable rootCause) {
38: super (message, rootCause);
39: }
40:
41: public UndeployException(Throwable rootCause) {
42: super (rootCause);
43: }
44:
45: public List<Throwable> getCauses() {
46: return causes;
47: }
48:
49: public void printStackTrace(PrintStream s) {
50: super .printStackTrace(s);
51:
52: for (Throwable throwable : causes) {
53: s.print("Nested caused by: ");
54: throwable.printStackTrace(s);
55: }
56: }
57:
58: public void printStackTrace(PrintWriter s) {
59: super .printStackTrace(s);
60:
61: for (Throwable throwable : causes) {
62: s.print("Nested caused by: ");
63: throwable.printStackTrace(s);
64: }
65: }
66: }
|