/** * 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(); }
protected XMLValidationException(XMLValidationProblem cause) { super(); if (cause == null) { throwMissing(); } mCause = cause; }
/** * Convenience method for constructing a {@link XMLValidationException} * to throw based on information contained in this object. * Base implementation is equivalent to: *<pre> * return XMLValidationException.createException(this); *</pre> * * @since 3.0 */ public XMLValidationException toException() { return XMLValidationException.createException(this); }
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); }
/** * 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); sb.append('\n'); sb.append(" at "); sb.append(locMsg); return sb.toString(); }
protected XMLValidationException(XMLValidationProblem cause, String msg) { super(msg); if (cause == null) { throwMissing(); } mCause = cause; }
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); }
/** * 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); sb.append('\n'); sb.append(" at "); sb.append(locMsg); return sb.toString(); }
protected XMLValidationException(XMLValidationProblem cause, String msg, Location loc) { super(msg, loc); if (cause == null) { throwMissing(); } mCause = cause; }
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); }
/** * 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(); }
protected XMLValidationException(XMLValidationProblem cause) { super(); if (cause == null) { throwMissing(); } mCause = cause; }
/** * 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(); }
protected XMLValidationException(XMLValidationProblem cause) { super(); if (cause == null) { throwMissing(); } mCause = cause; }
/** * 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(); }
protected XMLValidationException(XMLValidationProblem cause, String msg, Location loc) { super(msg, loc); if (cause == null) { throwMissing(); } mCause = cause; }
/** * 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(); }
protected XMLValidationException(XMLValidationProblem cause) { super(); if (cause == null) { throwMissing(); } mCause = cause; }
/** * 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(); }