/** * 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); }
/** * 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); }