Java 类javax.xml.bind.helpers.PrintConversionEventImpl 实例源码

项目:javacash    文件:Util.java   
/**
 * Reports a print conversion error while marshalling.
 */
public static void handlePrintConversionException(
    Object caller, Exception e, XMLSerializer serializer ) throws SAXException {

    if( e instanceof SAXException )
        // assume this exception is not from application.
        // (e.g., when a marshaller aborts the processing, this exception
        //        will be thrown) 
        throw (SAXException)e;

    String message = e.getMessage();
    if(message==null) {
        message = e.toString();
    }

    ValidationEvent ve = new PrintConversionEventImpl(
        ValidationEvent.ERROR, message,
        new ValidationEventLocatorImpl(caller), e );
    serializer.reportError(ve);
}
项目:wustl-common-package    文件:Util.java   
/**
 * Reports a print conversion error while marshalling.
 */
public static void handlePrintConversionException(
    Object caller, Exception e, XMLSerializer serializer ) throws SAXException {

    if( e instanceof SAXException )
        // assume this exception is not from application.
        // (e.g., when a marshaller aborts the processing, this exception
        //        will be thrown) 
        throw (SAXException)e;

    String message = e.getMessage();
    if(message==null) {
        message = e.toString();
    }

    ValidationEvent ve = new PrintConversionEventImpl(
        ValidationEvent.ERROR, message,
        new ValidationEventLocatorImpl(caller), e );
    serializer.reportError(ve);
}
项目:cxf-plus    文件:RuntimeUtil.java   
/**
 * Reports a print conversion error while marshalling.
 */
public static void handlePrintConversionException(
    Object caller, Exception e, XMLSerializer serializer ) throws SAXException {

    if( e instanceof SAXException )
        // assume this exception is not from application.
        // (e.g., when a marshaller aborts the processing, this exception
        //        will be thrown)
        throw (SAXException)e;

    ValidationEvent ve = new PrintConversionEventImpl(
        ValidationEvent.ERROR, e.getMessage(),
        new ValidationEventLocatorImpl(caller), e );
    serializer.reportError(ve);
}
项目:openjdk-icedtea7    文件:RuntimeUtil.java   
/**
 * Reports a print conversion error while marshalling.
 */
public static void handlePrintConversionException(
    Object caller, Exception e, XMLSerializer serializer ) throws SAXException {

    if( e instanceof SAXException )
        // assume this exception is not from application.
        // (e.g., when a marshaller aborts the processing, this exception
        //        will be thrown)
        throw (SAXException)e;

    ValidationEvent ve = new PrintConversionEventImpl(
        ValidationEvent.ERROR, e.getMessage(),
        new ValidationEventLocatorImpl(caller), e );
    serializer.reportError(ve);
}