@Override protected ValidationEventLocator getLocation() { return locator.getLocation(); }
public void handleError(Exception e,boolean canRecover) throws SAXException { handleEvent(new ValidationEventImpl(ValidationEvent.ERROR,e.getMessage(),locator.getLocation(),e),canRecover); }
public void handleError(String msg) { handleEvent(new ValidationEventImpl(ValidationEvent.ERROR,msg,locator.getLocation())); }
/** * Called when there's no corresponding ID value. */ public void errorUnresolvedIDREF(Object bean, String idref, LocatorEx loc) throws SAXException { handleEvent( new ValidationEventImpl( ValidationEvent.ERROR, Messages.UNRESOLVED_IDREF.format(idref), loc.getLocation()), true ); }
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 ); }
/** * Based on current {@link Logger} {@link Level} and errorCounter value determines if error should be reported. * * If the method called and return true it is expected that error will be reported. And that's why * errorCounter is automatically decremented during the check. * * NOT THREAD SAFE!!! In case of heave concurrency access several additional errors could be reported. It's not expected to be the * problem. Otherwise add synchronization here. * * @return true in case if {@link Level#FINEST} is set OR we haven't exceed errors reporting limit. */ public boolean shouldErrorBeReported() throws SAXException { if (logger.isLoggable(Level.FINEST)) return true; if (errorsCounter >= 0) { --errorsCounter; if (errorsCounter == 0) // it's possible to miss this because of concurrency. If required add synchronization here handleEvent(new ValidationEventImpl(ValidationEvent.WARNING, Messages.ERRORS_LIMIT_EXCEEDED.format(), getLocator().getLocation(), null), true); } return errorsCounter >= 0; } }
public Snapshot(LocatorEx loc) { columnNumber = loc.getColumnNumber(); lineNumber = loc.getLineNumber(); systemId = loc.getSystemId(); publicId = loc.getPublicId(); ValidationEventLocator vel = loc.getLocation(); offset = vel.getOffset(); url = vel.getURL(); object = vel.getObject(); node = vel.getNode(); }
@Override protected ValidationEventLocator getLocation() { return locator.getLocation(); }
public void handleError(Exception e,boolean canRecover) throws SAXException { handleEvent(new ValidationEventImpl(ValidationEvent.ERROR,e.getMessage(),locator.getLocation(),e),canRecover); }
public void handleError(String msg) { handleEvent(new ValidationEventImpl(ValidationEvent.ERROR,msg,locator.getLocation())); }
/** * Called when there's no corresponding ID value. */ public void errorUnresolvedIDREF(Object bean, String idref, LocatorEx loc) throws SAXException { handleEvent( new ValidationEventImpl( ValidationEvent.ERROR, Messages.UNRESOLVED_IDREF.format(idref), loc.getLocation()), true ); }
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 ); }
/** * Based on current {@link Logger} {@link Level} and errorCounter value determines if error should be reported. * * If the method called and return true it is expected that error will be reported. And that's why * errorCounter is automatically decremented during the check. * * NOT THREAD SAFE!!! In case of heave concurrency access several additional errors could be reported. It's not expected to be the * problem. Otherwise add synchronization here. * * @return true in case if {@link Level#FINEST} is set OR we haven't exceed errors reporting limit. */ public boolean shouldErrorBeReported() throws SAXException { if (logger.isLoggable(Level.FINEST)) return true; if (errorsCounter >= 0) { --errorsCounter; if (errorsCounter == 0) // it's possible to miss this because of concurrency. If required add synchronization here handleEvent(new ValidationEventImpl(ValidationEvent.WARNING, Messages.ERRORS_LIMIT_EXCEEDED.format(), getLocator().getLocation(), null), true); } return errorsCounter >= 0; } }
public Snapshot(LocatorEx loc) { columnNumber = loc.getColumnNumber(); lineNumber = loc.getLineNumber(); systemId = loc.getSystemId(); publicId = loc.getPublicId(); ValidationEventLocator vel = loc.getLocation(); offset = vel.getOffset(); url = vel.getURL(); object = vel.getObject(); node = vel.getNode(); }
/** * Called when there's no corresponding ID value. */ public void errorUnresolvedIDREF(Object bean, String idref, LocatorEx loc) throws SAXException { handleEvent( new ValidationEventImpl( ValidationEvent.ERROR, Messages.UNRESOLVED_IDREF.format(idref), loc.getLocation()), true ); }
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 ); }
public Snapshot(LocatorEx loc) { columnNumber = loc.getColumnNumber(); lineNumber = loc.getLineNumber(); systemId = loc.getSystemId(); publicId = loc.getPublicId(); ValidationEventLocator vel = loc.getLocation(); offset = vel.getOffset(); url = vel.getURL(); object = vel.getObject(); node = vel.getNode(); }
public Snapshot(LocatorEx loc) { columnNumber = loc.getColumnNumber(); lineNumber = loc.getLineNumber(); systemId = loc.getSystemId(); publicId = loc.getPublicId(); ValidationEventLocator vel = loc.getLocation(); offset = vel.getOffset(); url = vel.getURL(); object = vel.getObject(); node = vel.getNode(); }
public Snapshot(LocatorEx loc) { columnNumber = loc.getColumnNumber(); lineNumber = loc.getLineNumber(); systemId = loc.getSystemId(); publicId = loc.getPublicId(); ValidationEventLocator vel = loc.getLocation(); offset = vel.getOffset(); url = vel.getURL(); object = vel.getObject(); node = vel.getNode(); }
public Snapshot(LocatorEx loc) { columnNumber = loc.getColumnNumber(); lineNumber = loc.getLineNumber(); systemId = loc.getSystemId(); publicId = loc.getPublicId(); ValidationEventLocator vel = loc.getLocation(); offset = vel.getOffset(); url = vel.getURL(); object = vel.getObject(); node = vel.getNode(); }