/** * @return Returns the code. If there is a chained exception it recursively * calls {@code getCode()} on the cause of the chained exception rather than the returning * the code itself. */ public final String getCode() { final Throwable cause = this.getCause(); if (cause instanceof RootCasException) { return ((RootCasException) cause).getCode(); } return this.code; }
@Override public String toString() { return this.getCode(); } }