/** * Method is overridden so that we can properly inject description * of problem path, if such is defined. */ @Override public String getMessage() { /* First: if we have no path info, let's just use parent's * definition as is */ String msg = super.getMessage(); if (_path == null) { return msg; } /* 19-Feb-2009, tatu: Null and empty messages are not very * useful (plus nulls would lead to NPEs), so let's * use something else */ StringBuilder sb = (msg == null) ? new StringBuilder() : new StringBuilder(msg); /* 18-Feb-2009, tatu: initially there was a linefeed between * message and path reference; but unfortunately many systems * (loggers, junit) seem to assume linefeeds are only added to * separate stack trace. */ sb.append(" (through reference chain: "); _appendPathDesc(sb); sb.append(')'); return sb.toString(); }
/** * Method is overridden so that we can properly inject description * of problem path, if such is defined. */ @Override public String getMessage() { /* First: if we have no path info, let's just use parent's * definition as is */ String msg = super.getMessage(); if (_path == null) { return msg; } /* 19-Feb-2009, tatu: Null and empty messages are not very * useful (plus nulls would lead to NPEs), so let's * use something else */ StringBuilder sb = (msg == null) ? new StringBuilder() : new StringBuilder(msg); /* 18-Feb-2009, tatu: initially there was a linefeed between * message and path reference; but unfortunately many systems * (loggers, junit) seem to assume linefeeds are only added to * separate stack trace. */ sb.append(" (through reference chain: "); _appendPathDesc(sb); sb.append(')'); return sb.toString(); }
/** * Method is overridden so that we can properly inject description * of problem path, if such is defined. */ @Override public String getMessage() { /* First: if we have no path info, let's just use parent's * definition as is */ String msg = super.getMessage(); if (_path == null) { return msg; } /* 19-Feb-2009, tatu: Null and empty messages are not very * useful (plus nulls would lead to NPEs), so let's * use something else */ StringBuilder sb = (msg == null) ? new StringBuilder() : new StringBuilder(msg); /* 18-Feb-2009, tatu: initially there was a linefeed between * message and path reference; but unfortunately many systems * (loggers, junit) seem to assume linefeeds are only added to * separate stack trace. */ sb.append(" (through reference chain: "); _appendPathDesc(sb); sb.append(')'); return sb.toString(); }
/** * Method is overridden so that we can properly inject description * of problem path, if such is defined. */ public String getMessage() { /* First: if we have no path info, let's just use parent's * definition as is */ String msg = super.getMessage(); if (_path == null) { return msg; } /* 19-Feb-2009, tatu: Null and empty messages are not very * useful (plus nulls would lead to NPEs), so let's * use something else */ StringBuilder sb = (msg == null) ? new StringBuilder() : new StringBuilder(msg); /* 18-Feb-2009, tatu: initially there was a linefeed between * message and path reference; but unfortunately many systems * (loggers, junit) seem to assume linefeeds are only added to * separate stack trace. */ sb.append(" (through reference chain: "); _appendPathDesc(sb); sb.append(')'); return sb.toString(); }
/** * Method is overridden so that we can properly inject description * of problem path, if such is defined. */ @Override public String getMessage() { /* First: if we have no path info, let's just use parent's * definition as is */ String msg = super.getMessage(); if (_path == null) { return msg; } /* 19-Feb-2009, tatu: Null and empty messages are not very * useful (plus nulls would lead to NPEs), so let's * use something else */ StringBuilder sb = (msg == null) ? new StringBuilder() : new StringBuilder(msg); /* 18-Feb-2009, tatu: initially there was a linefeed between * message and path reference; but unfortunately many systems * (loggers, junit) seem to assume linefeeds are only added to * separate stack trace. */ sb.append(" (through reference chain: "); _appendPathDesc(sb); sb.append(')'); return sb.toString(); }
/** * Method is overridden so that we can properly inject description * of problem path, if such is defined. */ @Override public String getMessage() { /* First: if we have no path info, let's just use parent's * definition as is */ String msg = super.getMessage(); if (_path == null) { return msg; } /* 19-Feb-2009, tatu: Null and empty messages are not very * useful (plus nulls would lead to NPEs), so let's * use something else */ StringBuilder sb = (msg == null) ? new StringBuilder() : new StringBuilder(msg); /* 18-Feb-2009, tatu: initially there was a linefeed between * message and path reference; but unfortunately many systems * (loggers, junit) seem to assume linefeeds are only added to * separate stack trace. */ sb.append(" (through reference chain: "); _appendPathDesc(sb); sb.append(')'); return sb.toString(); }