KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > outerj > daisy > repository > clientimpl > infrastructure > DaisyPropagatedException


1 /*
2  * Copyright 2004 Outerthought bvba and Schaubroeck nv
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 package org.outerj.daisy.repository.clientimpl.infrastructure;
17
18 /**
19  * This is the default exception class used to restore exceptions
20  * that happened in the remote Daisy repository in the client.
21  */

22 public class DaisyPropagatedException extends Exception JavaDoc {
23     private String JavaDoc message;
24     private String JavaDoc remoteExceptionClassName;
25     private MyStackTraceElement[] remoteStackTrace;
26
27     public DaisyPropagatedException(String JavaDoc message, String JavaDoc remoteExceptionClassName, MyStackTraceElement[] remoteStackTrace) {
28         this.message = message;
29         this.remoteExceptionClassName = remoteExceptionClassName;
30         this.remoteStackTrace = remoteStackTrace;
31
32         setStackTrace(new StackTraceElement JavaDoc[0]);
33     }
34
35     public String JavaDoc getMessage() {
36         return "[" + remoteExceptionClassName + "] " + message;
37     }
38
39     public MyStackTraceElement[] getRemoteStackTrace() {
40         return remoteStackTrace;
41     }
42
43     public String JavaDoc getRemoteClassName() {
44         return remoteExceptionClassName;
45     }
46
47     public String JavaDoc getUserMessage() {
48         return message;
49     }
50 }
51
Popular Tags