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: *
15: * See the License for the specific language governing permissions and
16: * limitations under the License.
17: */
18:
19: /**
20: * @author Mikhail A. Markov
21: * @version $Revision: 1.7.4.2 $
22: */package java.rmi.server;
23:
24: import org.apache.harmony.rmi.internal.nls.Messages;
25:
26: /**
27: * @com.intel.drl.spec_ref
28: *
29: * @author Mikhail A. Markov
30: * @version $Revision: 1.7.4.2 $
31: */
32: public class ServerCloneException extends CloneNotSupportedException {
33:
34: private static final long serialVersionUID = 6617456357664815945L;
35:
36: /**
37: * @com.intel.drl.spec_ref
38: */
39: public Exception detail;
40:
41: /**
42: * @com.intel.drl.spec_ref
43: */
44: public ServerCloneException(String msg, Exception cause) {
45: super (msg);
46: detail = cause;
47: initCause(null);
48: }
49:
50: /**
51: * @com.intel.drl.spec_ref
52: */
53: public ServerCloneException(String msg) {
54: this (msg, null);
55: }
56:
57: /**
58: * @com.intel.drl.spec_ref
59: */
60: public Throwable getCause() {
61: return detail;
62: }
63:
64: /**
65: * @com.intel.drl.spec_ref
66: */
67: public String getMessage() {
68: if (detail == null) {
69: return super .getMessage();
70: } else {
71: // rmi.1E={0} Caused by: {1}
72: return Messages.getString(
73: "rmi.1E", super .getMessage(), detail.getMessage()); //$NON-NLS-1$
74: }
75: }
76: }
|