Search in sources :

Example 1 with ParseConversionEventImpl

use of javax.xml.bind.helpers.ParseConversionEventImpl in project OpenAM by OpenRock.

the class AbstractUnmarshallingEventHandlerImpl method handleParseConversionException.

/**
     * This method is called by the generated derived class
     * when a datatype parse method throws an exception.
     */
protected void handleParseConversionException(Exception e) throws SAXException {
    if (e instanceof RuntimeException)
        // don't catch the runtime exception. just let it go.
        throw (RuntimeException) e;
    // wrap it into a ParseConversionEvent and report it
    ParseConversionEvent pce = new ParseConversionEventImpl(ValidationEvent.ERROR, e.getMessage(), new ValidationEventLocatorImpl(context.getLocator()), e);
    context.handleEvent(pce, true);
}
Also used : ValidationEventLocatorImpl(javax.xml.bind.helpers.ValidationEventLocatorImpl) ParseConversionEventImpl(javax.xml.bind.helpers.ParseConversionEventImpl) ParseConversionEvent(javax.xml.bind.ParseConversionEvent)

Example 2 with ParseConversionEventImpl

use of javax.xml.bind.helpers.ParseConversionEventImpl in project OpenAM by OpenRock.

the class AbstractUnmarshallingEventHandlerImpl method handleParseConversionException.

/**
     * This method is called by the generated derived class
     * when a datatype parse method throws an exception.
     */
protected void handleParseConversionException(Exception e) throws SAXException {
    if (e instanceof RuntimeException)
        // don't catch the runtime exception. just let it go.
        throw (RuntimeException) e;
    // wrap it into a ParseConversionEvent and report it
    ParseConversionEvent pce = new ParseConversionEventImpl(ValidationEvent.ERROR, e.getMessage(), new ValidationEventLocatorImpl(context.getLocator()), e);
    context.handleEvent(pce, true);
}
Also used : ValidationEventLocatorImpl(javax.xml.bind.helpers.ValidationEventLocatorImpl) ParseConversionEventImpl(javax.xml.bind.helpers.ParseConversionEventImpl) ParseConversionEvent(javax.xml.bind.ParseConversionEvent)

Example 3 with ParseConversionEventImpl

use of javax.xml.bind.helpers.ParseConversionEventImpl in project OpenAM by OpenRock.

the class AbstractUnmarshallingEventHandlerImpl method handleParseConversionException.

/**
     * This method is called by the generated derived class
     * when a datatype parse method throws an exception.
     */
protected void handleParseConversionException(Exception e) throws SAXException {
    if (e instanceof RuntimeException)
        // don't catch the runtime exception. just let it go.
        throw (RuntimeException) e;
    // wrap it into a ParseConversionEvent and report it
    ParseConversionEvent pce = new ParseConversionEventImpl(ValidationEvent.ERROR, e.getMessage(), new ValidationEventLocatorImpl(context.getLocator()), e);
    context.handleEvent(pce, true);
}
Also used : ValidationEventLocatorImpl(javax.xml.bind.helpers.ValidationEventLocatorImpl) ParseConversionEventImpl(javax.xml.bind.helpers.ParseConversionEventImpl) ParseConversionEvent(javax.xml.bind.ParseConversionEvent)

Example 4 with ParseConversionEventImpl

use of javax.xml.bind.helpers.ParseConversionEventImpl in project OpenAM by OpenRock.

the class AbstractUnmarshallingEventHandlerImpl method handleParseConversionException.

/**
     * This method is called by the generated derived class
     * when a datatype parse method throws an exception.
     */
protected void handleParseConversionException(Exception e) throws SAXException {
    if (e instanceof RuntimeException)
        // don't catch the runtime exception. just let it go.
        throw (RuntimeException) e;
    // wrap it into a ParseConversionEvent and report it
    ParseConversionEvent pce = new ParseConversionEventImpl(ValidationEvent.ERROR, e.getMessage(), new ValidationEventLocatorImpl(context.getLocator()), e);
    context.handleEvent(pce, true);
}
Also used : ValidationEventLocatorImpl(javax.xml.bind.helpers.ValidationEventLocatorImpl) ParseConversionEventImpl(javax.xml.bind.helpers.ParseConversionEventImpl) ParseConversionEvent(javax.xml.bind.ParseConversionEvent)

Aggregations

ParseConversionEvent (javax.xml.bind.ParseConversionEvent)4 ParseConversionEventImpl (javax.xml.bind.helpers.ParseConversionEventImpl)4 ValidationEventLocatorImpl (javax.xml.bind.helpers.ValidationEventLocatorImpl)4