private MarshalSAXParseException marshalSAXParseException(SAXParseException exception) { return new MarshalSAXParseException(exception.getLocalizedMessage(), exception.getPublicId(), exception.getSystemId(), exception.getLineNumber(), exception.getColumnNumber(), exception.getException(), marshalRecord.getOwningObject()); }
public void afterContainmentMarshal(Object parent, Object child) { if(null != marshaller) { Marshaller.Listener marshalListener = marshaller.getMarshalListener(); if(null != marshalListener) { try { marshalListener.afterMarshal(child); } catch(EclipseLinkException e) { ErrorHandler errorHandler = marshaller.getErrorHandler(); if(null == errorHandler) { throw e; } else { try { MarshalSAXParseException saxParseException = new MarshalSAXParseException(null, null, null, -1, -1, e, child); errorHandler.error(saxParseException); } catch(SAXException saxParseException) { throw e; } } } } } setOwningObject(parent); }
public void afterContainmentMarshal(Object parent, Object child) { if(null != marshaller) { Marshaller.Listener marshalListener = marshaller.getMarshalListener(); if(null != marshalListener) { try { marshalListener.afterMarshal(child); } catch(EclipseLinkException e) { ErrorHandler errorHandler = marshaller.getErrorHandler(); if(null == errorHandler) { throw e; } else { try { MarshalSAXParseException saxParseException = new MarshalSAXParseException(null, null, null, -1, -1, e, child); errorHandler.error(saxParseException); } catch(SAXException saxParseException) { throw e; } } } } } setOwningObject(parent); }
public void beforeContainmentMarshal(Object child) { if(null != marshaller) { Marshaller.Listener marshalListener = marshaller.getMarshalListener(); if(null != marshalListener) { try { marshalListener.beforeMarshal(child); } catch(EclipseLinkException e) { ErrorHandler errorHandler = marshaller.getErrorHandler(); if(null == errorHandler) { throw e; } else { try { MarshalSAXParseException saxParseException = new MarshalSAXParseException(null, null, null, -1, -1, e, child); errorHandler.error(saxParseException); } catch(SAXException saxParseException) { throw e; } } } } } setOwningObject(child); }
public void beforeContainmentMarshal(Object child) { if(null != marshaller) { Marshaller.Listener marshalListener = marshaller.getMarshalListener(); if(null != marshalListener) { try { marshalListener.beforeMarshal(child); } catch(EclipseLinkException e) { ErrorHandler errorHandler = marshaller.getErrorHandler(); if(null == errorHandler) { throw e; } else { try { MarshalSAXParseException saxParseException = new MarshalSAXParseException(null, null, null, -1, -1, e, child); errorHandler.error(saxParseException); } catch(SAXException saxParseException) { throw e; } } } } } setOwningObject(child); }
private void handleException(SAXParseException exception, int severity) throws SAXException { ValidationEventLocatorImpl eventLocator = new ValidationEventLocatorImpl(exception); if(exception instanceof MarshalSAXParseException) { eventLocator.setObject(((MarshalSAXParseException) exception).getObject()); } Throwable linkedException = exception.getCause(); if(linkedException instanceof EclipseLinkException) { linkedException = exception.getCause(); } ValidationEvent event = new ValidationEventImpl(severity, exception.getLocalizedMessage(), eventLocator, linkedException); if (!eventHandler.handleEvent(event)) { if(linkedException instanceof EclipseLinkException) { throw (EclipseLinkException) linkedException; } throw exception; } }
private void handleException(SAXParseException exception, int severity) throws SAXException { ValidationEventLocatorImpl eventLocator = new ValidationEventLocatorImpl(exception); if(exception instanceof MarshalSAXParseException) { eventLocator.setObject(((MarshalSAXParseException) exception).getObject()); } Throwable linkedException = exception.getCause(); if(linkedException instanceof EclipseLinkException) { linkedException = exception.getCause(); } ValidationEvent event = new ValidationEventImpl(severity, exception.getLocalizedMessage(), eventLocator, linkedException); if (!eventHandler.handleEvent(event)) { if(linkedException instanceof EclipseLinkException) { throw (EclipseLinkException) linkedException; } throw exception; } }
private MarshalSAXParseException marshalSAXParseException(SAXParseException exception) { return new MarshalSAXParseException(exception.getLocalizedMessage(), exception.getPublicId(), exception.getSystemId(), exception.getLineNumber(), exception.getColumnNumber(), exception.getException(), marshalRecord.getOwningObject()); }