The MarshalException is a subclass of the {@link javax.xml.bind.JAXBException} being thrown if theunmarshalling of a JAXB object failed.
MarshalException
208209210211212213214215216217218
reader.setErrorHandler(coordinator); try { reader.parse(source); } catch( IOException e ) { throw new UnmarshalException(e); } catch( SAXException e ) { throw createUnmarshalException(e); } Object result = connector.getResult();
420421422423424425426427
// that could throw away some meaningful exception information. Throwable ne = e.getNestedException(); if(ne instanceof JAXBException) return (JAXBException)ne; if(ne instanceof SAXException) return new UnmarshalException(ne); return new UnmarshalException(e); }
146147148149150151152153154155156
u.coordinator.setThreadAffinity(); u.coordinator.pushCoordinator(); try { return a.unmarshal(v); } catch (Exception e) { throw new UnmarshalException(e); } finally { u.coordinator.popCoordinator(); u.coordinator.resetThreadAffinity(); } }
538539540541542543544
throw new IllegalStateException(); if(!aborted) return result; // there was an error. throw new UnmarshalException((String)null); }
612613614615616617618619620
// from the unmarshaller.getResult() if(!recover) aborted = true; if( !canRecover || !recover ) throw new SAXParseException2( event.getMessage(), locator, new UnmarshalException( event.getMessage(), event.getLinkedException() ) ); }
416417418419420421422423
605606607608609610611612613
99100101102103104105106
value = new JAXBElement(qname, unwrappedValue.getClass(), unwrappedValue); } } return value; } catch (Exception e) { throw new UnmarshalException(e); } }