public String toString() { final StringBuilder b = new StringBuilder(getClass().getName()); if (serviceName != null) { b.append(" in ").append(serviceName); } else { b.append(" in anonymous service"); } final String m = getLocalizedMessage(); if (m != null) { b.append(": ").append(m); } return b.toString(); } }
public String toString() { final StringBuilder b = new StringBuilder(getClass().getName()); if (serviceName != null) { b.append(" in ").append(serviceName); } else { b.append(" in anonymous service"); } final String m = getLocalizedMessage(); if (m != null) { b.append(": ").append(m); } return b.toString(); } }
private static ModelNode getServiceFailureDescription(final StartException exception) { final ModelNode result = new ModelNode(); if (exception != null) { // This is a bit of inside knowledge of StartException. Its toString() prefixes // the main data with 'org...StartException in org.foo.bar: " stuff that // will be redundant in the overall output we are creating so we omit that if we can. String msg = exception.getLocalizedMessage(); if (msg == null || msg.length() == 0) { msg = exception.toString(); } StringBuilder sb = new StringBuilder(msg); Throwable cause = exception.getCause(); while (cause != null) { sb.append("\n Caused by: "); sb.append(cause.toString()); cause = cause.getCause(); } result.set(sb.toString()); } return result; }
private static ModelNode getServiceFailureDescription(final StartException exception) { final ModelNode result = new ModelNode(); if (exception != null) { // This is a bit of inside knowledge of StartException. Its toString() prefixes // the main data with 'org...StartException in org.foo.bar: " stuff that // will be redundant in the overall output we are creating so we omit that if we can. String msg = exception.getLocalizedMessage(); if (msg == null || msg.length() == 0) { msg = exception.toString(); } StringBuilder sb = new StringBuilder(msg); Throwable cause = exception.getCause(); while (cause != null) { sb.append("\n Caused by: "); sb.append(cause.toString()); cause = cause.getCause(); } result.set(sb.toString()); } return result; }
String exMsg = startException.getLocalizedMessage(); if (exMsg == null || exMsg.length() == 0) { exMsg = startException.toString();
String exMsg = startException.getLocalizedMessage(); if (exMsg == null || exMsg.length() == 0) { exMsg = startException.toString();