}
else if (ex instanceof MarshalException) {
return new MarshallingFailureException("JAXB marshalling exception", ex);
}
else if (ex instanceof UnmarshalException) {
return new UnmarshallingFailureException("JAXB unmarshalling exception", ex);
}
else {
// fallback
return new UncategorizedMappingException("Unknown JAXB exception", ex);
}