reportError(msg, null, canRecover );
}
public static void reportError(String msg, Exception nested, boolean canRecover) throws SAXException {
UnmarshallingContext context = UnmarshallingContext.getInstance();
context.handleEvent( new ValidationEventImpl(
canRecover? ValidationEvent.ERROR : ValidationEvent.FATAL_ERROR,
msg,
context.getLocator().getLocation(),
nested ), canRecover );
}