public static WstxValidationException create(XMLValidationProblem cause) { // Should always get a message Location loc = cause.getLocation(); if (loc == null) { return new WstxValidationException(cause, cause.getMessage()); } return new WstxValidationException(cause, cause.getMessage(), loc); }
protected void doReportProblem(XMLReporter rep, XMLValidationProblem prob) throws XMLStreamException { if (rep != null) { Location loc = prob.getLocation(); if (loc == null) { loc = getLocation(); prob.setLocation(loc); } // Backwards-compatibility fix: add non-null type, if missing: if (prob.getType() == null) { prob.setType(ErrorConsts.WT_VALIDATION); } // [WSTX-154]: was catching and dropping thrown exception: shouldn't. rep.report(prob.getMessage(), prob.getType(), prob, loc); } }
protected void _reportProblem(XMLReporter rep, XMLValidationProblem prob) throws XMLStreamException { if (rep != null) { Location loc = prob.getLocation(); if (loc == null) { loc = getLastCharLocation(); prob.setLocation(loc); } // Backwards-compatibility fix: add non-null type, if missing: if (prob.getType() == null) { prob.setType(ErrorConsts.WT_VALIDATION); } // [WSTX-154]: was catching and dropping thrown exception: shouldn't. // [WTSX-157]: need to support XMLReporter2 if (rep instanceof XMLReporter2) { ((XMLReporter2) rep).report(prob); } else { rep.report(prob.getMessage(), prob.getType(), prob, loc); } } }
protected void doReportProblem(XMLReporter rep, XMLValidationProblem prob, String probType) { if (rep != null) { Location loc = prob.getLocation(); if (loc == null) { loc = getLastCharLocation(); } try { rep.report(prob.getMessage(), probType, prob, loc); } catch (XMLStreamException e) { /* !!! 27-May-2008, TSa: This WRONG: XMLReporter can and * even should throw exceptions in some cases (to signal * it considers some problems as actual fatals) */ System.err.println("Internal error - problem reporting a problem: "+e); } } }
public static WstxValidationException create(XMLValidationProblem cause) { // Should always get a message Location loc = cause.getLocation(); if (loc == null) { return new WstxValidationException(cause, cause.getMessage()); } return new WstxValidationException(cause, cause.getMessage(), loc); }
public static ValidationException create(XMLValidationProblem cause) { // Should always get a message Location loc = cause.getLocation(); if (loc == null) { return new ValidationException(cause, cause.getMessage()); } return new ValidationException(cause, cause.getMessage(), loc); }
public static WstxValidationException create(XMLValidationProblem cause) { // Should always get a message Location loc = cause.getLocation(); if (loc == null) { return new WstxValidationException(cause, cause.getMessage()); } return new WstxValidationException(cause, cause.getMessage(), loc); }
public static XMLValidationException createException(XMLValidationProblem cause) { String msg = cause.getMessage(); if (msg == null) { return new XMLValidationException(cause); } Location loc = cause.getLocation(); if (loc == null) { return new XMLValidationException(cause, msg); } return new XMLValidationException(cause, msg, loc); }
public static ValidationException create(XMLValidationProblem cause) { // Should always get a message Location loc = cause.getLocation(); if (loc == null) { return new ValidationException(cause, cause.getMessage()); } return new ValidationException(cause, cause.getMessage(), loc); }
public static XMLValidationException createException(XMLValidationProblem cause) { String msg = cause.getMessage(); if (msg == null) { return new XMLValidationException(cause); } Location loc = cause.getLocation(); if (loc == null) { return new XMLValidationException(cause, msg); } return new XMLValidationException(cause, msg, loc); }
public static XMLValidationException createException(XMLValidationProblem cause) { String msg = cause.getMessage(); if (msg == null) { return new XMLValidationException(cause); } Location loc = cause.getLocation(); if (loc == null) { return new XMLValidationException(cause, msg); } return new XMLValidationException(cause, msg, loc); }
public static WstxValidationException create(XMLValidationProblem cause) { // Should always get a message Location loc = cause.getLocation(); if (loc == null) { return new WstxValidationException(cause, cause.getMessage()); } return new WstxValidationException(cause, cause.getMessage(), loc); }
public static WstxValidationException create(XMLValidationProblem cause) { // Should always get a message Location loc = cause.getLocation(); if (loc == null) { return new WstxValidationException(cause, cause.getMessage()); } return new WstxValidationException(cause, cause.getMessage(), loc); }
public static WstxValidationException create(XMLValidationProblem cause) { // Should always get a message Location loc = cause.getLocation(); if (loc == null) { return new WstxValidationException(cause, cause.getMessage()); } return new WstxValidationException(cause, cause.getMessage(), loc); }
public static XMLValidationException createException(XMLValidationProblem cause) { String msg = cause.getMessage(); if (msg == null) { return new XMLValidationException(cause); } Location loc = cause.getLocation(); if (loc == null) { return new XMLValidationException(cause, msg); } return new XMLValidationException(cause, msg, loc); }
public static WstxValidationException create(XMLValidationProblem cause) { // Should always get a message Location loc = cause.getLocation(); if (loc == null) { return new WstxValidationException(cause, cause.getMessage()); } return new WstxValidationException(cause, cause.getMessage(), loc); }
public static WstxValidationException create(XMLValidationProblem cause) { // Should always get a message Location loc = cause.getLocation(); if (loc == null) { return new WstxValidationException(cause, cause.getMessage()); } return new WstxValidationException(cause, cause.getMessage(), loc); }
protected void doReportProblem(XMLReporter rep, XMLValidationProblem prob) throws XMLStreamException { if (rep != null) { Location loc = prob.getLocation(); if (loc == null) { loc = getLocation(); prob.setLocation(loc); } // Backwards-compatibility fix: add non-null type, if missing: if (prob.getType() == null) { prob.setType(ErrorConsts.WT_VALIDATION); } // [WSTX-154]: was catching and dropping thrown exception: shouldn't. rep.report(prob.getMessage(), prob.getType(), prob, loc); } }
protected void doReportProblem(XMLReporter rep, XMLValidationProblem prob) throws XMLStreamException { if (rep != null) { Location loc = prob.getLocation(); if (loc == null) { loc = getLocation(); prob.setLocation(loc); } // Backwards-compatibility fix: add non-null type, if missing: if (prob.getType() == null) { prob.setType(ErrorConsts.WT_VALIDATION); } // [WSTX-154]: was catching and dropping thrown exception: shouldn't. rep.report(prob.getMessage(), prob.getType(), prob, loc); } }
protected void doReportProblem(XMLReporter rep, XMLValidationProblem prob) throws XMLStreamException { if (rep != null) { Location loc = prob.getLocation(); if (loc == null) { loc = getLocation(); prob.setLocation(loc); } // Backwards-compatibility fix: add non-null type, if missing: if (prob.getType() == null) { prob.setType(ErrorConsts.WT_VALIDATION); } // [WSTX-154]: was catching and dropping thrown exception: shouldn't. rep.report(prob.getMessage(), prob.getType(), prob, loc); } }