Java Code Examples for org.springframework.oxm.UncategorizedMappingException

Following code examples demonstrate how to use org.springframework.oxm.UncategorizedMappingExceptionfrom spring-framework. These examples are extracted from various highly rated open source projects. You can directly use these code snippets or view their entire linked source code. These snippets are extracted to provide contextual information about how to use this class in the real world. These samples also let you understand some good practices on how to use org.springframework.oxm.UncategorizedMappingExceptionand various code implementation of this class.

	public static XmlMappingException convertXStreamException(Exception ex, boolean marshalling) {
		if (ex instanceof StreamException || ex instanceof CannotResolveClassException ||
				ex instanceof ConversionException) {
			if (marshalling) {
				return new MarshallingFailureException("XStream marshalling exception",  ex);
			}
			else {
				return new UnmarshallingFailureException("XStream unmarshalling exception", ex);
			}
		}
		else {
			return new UncategorizedMappingException("Unknown XStream exception", ex);
		}
	} 


Advertisement
Javadoc
Exception that indicates that the cause cannot be distinguished further. @author Arjen Poutsma @sinc

e 3.0

Read More
Advertisement