01: /*
02: * Copyright 2006 the original author or authors.
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
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:
17: package org.springframework.oxm.xstream;
18:
19: import javax.xml.stream.XMLStreamException;
20:
21: import com.thoughtworks.xstream.alias.CannotResolveClassException;
22: import com.thoughtworks.xstream.converters.ConversionException;
23: import com.thoughtworks.xstream.io.StreamException;
24: import org.springframework.oxm.UnmarshallingFailureException;
25:
26: /**
27: * XStream-specific subclass of <code>UnmarshallingFailureException</code>.
28: *
29: * @author Arjen Poutsma
30: * @since 1.0.0
31: */
32: public class XStreamUnmarshallingFailureException extends
33: UnmarshallingFailureException {
34:
35: public XStreamUnmarshallingFailureException(StreamException ex) {
36: super ("XStream unmarshalling exception: " + ex.getMessage(), ex);
37: }
38:
39: public XStreamUnmarshallingFailureException(
40: CannotResolveClassException ex) {
41: super ("XStream resolving exception: " + ex.getMessage(), ex);
42: }
43:
44: public XStreamUnmarshallingFailureException(ConversionException ex) {
45: super ("XStream conversion exception: " + ex.getMessage(), ex);
46: }
47:
48: public XStreamUnmarshallingFailureException(String msg) {
49: super (msg);
50: }
51:
52: public XStreamUnmarshallingFailureException(String msg,
53: XMLStreamException ex) {
54: super(msg, ex);
55: }
56:
57: }
|