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 String getLocationDesc() { Location loc = getLocation(); return (loc == null) ? null : loc.toString(); } }
/** * Method is overridden for two main reasons: first, default method * does not display public/system id information, even if it exists, and * second, default implementation can not handle nested Location * information. */ public String getMessage() { String locMsg = getLocationDesc(); /* Better not use super's message if we do have location information, * since parent's message contains (part of) Location * info; something we can regenerate better... */ if (locMsg == null) { return super.getMessage(); } String msg = getValidationProblem().getMessage(); StringBuffer sb = new StringBuffer(msg.length() + locMsg.length() + 20); sb.append(msg); StringUtil.appendLF(sb); sb.append(" at "); sb.append(locMsg); return sb.toString(); }
public String toString() { return getClass().getName()+": "+getMessage(); }
/** * Method is overridden for two main reasons: first, default method * does not display public/system id information, even if it exists, and * second, default implementation can not handle nested Location * information. */ public String getMessage() { String locMsg = getLocationDesc(); /* Better not use super's message if we do have location information, * since parent's message contains (part of) Location * info; something we can regenerate better... */ if (locMsg == null) { return super.getMessage(); } String msg = getValidationProblem().getMessage(); StringBuffer sb = new StringBuffer(msg.length() + locMsg.length() + 20); sb.append(msg); StringUtil.appendLF(sb); sb.append(" at "); sb.append(locMsg); return sb.toString(); }
public String toString() { return getClass().getName()+": "+getMessage(); }
/** * Method is overridden for two main reasons: first, default method * does not display public/system id information, even if it exists, and * second, default implementation can not handle nested Location * information. */ public String getMessage() { String locMsg = getLocationDesc(); /* Better not use super's message if we do have location information, * since parent's message contains (part of) Location * info; something we can regenerate better... */ if (locMsg == null) { return super.getMessage(); } String msg = getValidationProblem().getMessage(); StringBuffer sb = new StringBuffer(msg.length() + locMsg.length() + 20); sb.append(msg); StringUtil.appendLF(sb); sb.append(" at "); sb.append(locMsg); return sb.toString(); }
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 String getLocationDesc() { Location loc = getLocation(); return (loc == null) ? null : loc.toString(); } }
@Override public String toString() { return getClass().getName()+": "+getMessage(); }
/** * Method is overridden for two main reasons: first, default method * does not display public/system id information, even if it exists, and * second, default implementation can not handle nested Location * information. */ public String getMessage() { String locMsg = getLocationDesc(); /* Better not use super's message if we do have location information, * since parent's message contains (part of) Location * info; something we can regenerate better... */ if (locMsg == null) { return super.getMessage(); } String msg = getValidationProblem().getMessage(); StringBuffer sb = new StringBuffer(msg.length() + locMsg.length() + 20); sb.append(msg); StringUtil.appendLF(sb); sb.append(" at "); sb.append(locMsg); return sb.toString(); }
public static WstxValidationException create(String msg, Location loc, int severity) { return create(new XMLValidationProblem(loc, msg, severity)); }
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 String getLocationDesc() { Location loc = getLocation(); return (loc == null) ? null : loc.toString(); } }
public String toString() { return getClass().getName()+": "+getMessage(); }
/** * Method is overridden for two main reasons: first, default method * does not display public/system id information, even if it exists, and * second, default implementation can not handle nested Location * information. */ @Override public String getMessage() { String locMsg = getLocationDesc(); /* Better not use super's message if we do have location information, * since parent's message contains (part of) Location * info; something we can regenerate better... */ if (locMsg == null) { return super.getMessage(); } String msg = getValidationProblem().getMessage(); StringBuilder sb = new StringBuilder(msg.length() + locMsg.length() + 20); sb.append(msg); StringUtil.appendLF(sb); sb.append(" at "); sb.append(locMsg); return sb.toString(); }
public static WstxValidationException create(String msg, Location loc, int severity) { return create(new XMLValidationProblem(loc, msg, severity)); }
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); }