Description
In below code snippets, we can include e, instead of e.toString(), so that caller can get complete trace.
1)
/** Set to contain the contents of a string.
*/
public void set(String string) {
try
catch(CharacterCodingException e)
{ throw new RuntimeException("Should not have happened ",e.toString()); }}
2)
public String toString() {
try { return decode(bytes, 0, length); } catch (CharacterCodingException e) { throw new RuntimeException("Should not have happened ",e.toString()); }
}