protected void reportNull() throws WstxException { throw new WstxException("Illegal null byte in input stream", getLocation()); }
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(); } StringBuffer sb = new StringBuffer(mMsg.length() + locMsg.length() + 20); sb.append(mMsg); StringUtil.appendLF(sb); sb.append(" at "); sb.append(locMsg); return sb.toString(); }
public String toString() { return getClass().getName()+": "+getMessage(); }
public String toString() { return getClass().getName()+": "+getMessage(); }
protected void throwFromStrE(XMLStreamException strex) throws WstxException { if (strex instanceof WstxException) { throw (WstxException) strex; } WstxException newEx = new WstxException(strex); ExceptionUtil.setInitCause(newEx, strex); throw newEx; }
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. */ 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(); } StringBuffer sb = new StringBuffer(mMsg.length() + locMsg.length() + 20); sb.append(mMsg); StringUtil.appendLF(sb); sb.append(" at "); sb.append(locMsg); return sb.toString(); }
throw new WstxException("Reader (of type "+mReader.getClass().getName()+") returned 0 characters, even when asked to read up to "+mBuffer.length, getLocation());
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. */ @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(); } StringBuilder sb = new StringBuilder(mMsg.length() + locMsg.length() + 20); sb.append(mMsg); StringUtil.appendLF(sb); sb.append(" at "); sb.append(locMsg); return sb.toString(); }
if (actual < 1) { if (actual == 0) { // sanity check: throw new WstxException("Reader (of type "+mReader.getClass().getName()+") returned 0 characters, even when asked to read up to "+amount, getLocation());
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. */ @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(); } StringBuilder sb = new StringBuilder(mMsg.length() + locMsg.length() + 20); sb.append(mMsg); StringUtil.appendLF(sb); sb.append(" at "); sb.append(locMsg); return sb.toString(); }
BaseStartElement be = (BaseStartElement) sr.withStartElement(this, loc); if (be == null) { // incorrect state throw new WstxException("Trying to create START_ELEMENT when current event is " +ErrorConsts.tokenTypeDesc(sr.getEventType()), loc); throw new WstxException("Internal error: should not get " +ErrorConsts.tokenTypeDesc(r.getEventType())); default:
protected String getLocationDesc() { Location loc = getLocation(); return (loc == null) ? null : loc.toString(); } }
public String toString() { return getClass().getName()+": "+getMessage(); }