/** * Return the exception message. * As of Spring 4.0, this method returns the same result as {@link #toDetailedString()}. * @see #getSimpleMessage() * @see java.lang.Throwable#getMessage() */ @Override public String getMessage() { return toDetailedString(); }
/** * Return the exception message. * As of Spring 4.0, this method returns the same result as {@link #toDetailedString()}. * @see #getSimpleMessage() * @see java.lang.Throwable#getMessage() */ @Override public String getMessage() { return toDetailedString(); }
@Test public void exceptions() { ExpressionException exprEx = new ExpressionException("test"); assertEquals("test", exprEx.getSimpleMessage()); assertEquals("test", exprEx.toDetailedString()); assertEquals("test", exprEx.getMessage()); exprEx = new ExpressionException("wibble", "test"); assertEquals("test", exprEx.getSimpleMessage()); assertEquals("Expression [wibble]: test", exprEx.toDetailedString()); assertEquals("Expression [wibble]: test", exprEx.getMessage()); exprEx = new ExpressionException("wibble", 3, "test"); assertEquals("test", exprEx.getSimpleMessage()); assertEquals("Expression [wibble] @3: test", exprEx.toDetailedString()); assertEquals("Expression [wibble] @3: test", exprEx.getMessage()); }
/** * Return the exception message. * As of Spring 4.0, this method returns the same result as {@link #toDetailedString()}. * @see #getSimpleMessage() * @see java.lang.Throwable#getMessage() */ @Override public String getMessage() { return toDetailedString(); }