/** * You can also modify the body of this method to customize your error messages. * For example, cases like LOOP_DETECTED and INVALID_LEXICAL_STATE are not * of end-users concern, so you can return something like : * <p/> * "Internal Error : Please file a bug report .... " * <p/> * from this method for such cases in the release version of your parser. */ public String getMessage() { return super.getMessage(); }
/** * You can also modify the body of this method to customize your error messages. * For example, cases like LOOP_DETECTED and INVALID_LEXICAL_STATE are not * of end-users concern, so you can return something like : * * "Internal Error : Please file a bug report .... " * * from this method for such cases in the release version of your parser. */ public String getMessage() { return super.getMessage(); }
/** * You can also modify the body of this method to customize your error messages. * For example, cases like LOOP_DETECTED and INVALID_LEXICAL_STATE are not * of end-users concern, so you can return something like : * * "Internal Error : Please file a bug report .... " * * from this method for such cases in the release version of your parser. */ public String getMessage() { return super.getMessage(); }
/** * You can also modify the body of this method to customize your error messages. * For example, cases like LOOP_DETECTED and INVALID_LEXICAL_STATE are not * of end-users concern, so you can return something like : * * "Internal Error : Please file a bug report .... " * * from this method for such cases in the release version of your parser. */ public String getMessage() { return super.getMessage(); }
/** * You can also modify the body of this method to customize your error messages. * For example, cases like LOOP_DETECTED and INVALID_LEXICAL_STATE are not * of end-users concern, so you can return something like : * * "Internal Error : Please file a bug report .... " * * from this method for such cases in the release version of your parser. */ public String getMessage() { return super.getMessage(); }
/** * You can also modify the body of this method to customize your error messages. * For example, cases like LOOP_DETECTED and INVALID_LEXICAL_STATE are not * of end-users concern, so you can return something like : * * "Internal Error : Please file a bug report .... " * * from this method for such cases in the release version of your parser. */ public String getMessage() { return super.getMessage(); }
/** * You can also modify the body of this method to customize your error messages. * For example, cases like LOOP_DETECTED and INVALID_LEXICAL_STATE are not * of end-users concern, so you can return something like : * * "Internal Error : Please file a bug report .... " * * from this method for such cases in the release version of your parser. */ public String getMessage() { return super.getMessage(); }
/** * You can also modify the body of this method to customize your error messages. * For example, cases like LOOP_DETECTED and INVALID_LEXICAL_STATE are not * of end-users concern, so you can return something like : * * "Internal Error : Please file a bug report .... " * * from this method for such cases in the release version of your parser. */ public String getMessage() { return super.getMessage(); }
/** * You can also modify the body of this method to customize your error messages. * For example, cases like LOOP_DETECTED and INVALID_LEXICAL_STATE are not * of end-users concern, so you can return something like : * * "Internal Error : Please file a bug report .... " * * from this method for such cases in the release version of your parser. */ public String getMessage() { return super.getMessage(); }
/** * Returns the detail message string of this throwable. If it was * created with a null message, returns the following: * (cause==null ? null : cause.toString()). * * @return String message string of the throwable */ public String getMessage() { if (super.getMessage() != null) { return super.getMessage(); } else if (cause != null) { return cause.toString(); } else { return null; } }
@Override public String getMessage() { return String.format(super.getMessage(), msgArgs); } }
@Override public String toString() { return String.format("%s(propertyName = %s, count = %s, error = %s, sample = %s)", getClass().getSimpleName(), propertyName, count, error.getMessage(), sample); } }
@Override public String getMessage() { return String.format("[%s] %s", errorCode.name(), super.getMessage()); } }
/** * {@inheritDoc} */ public String getMessage(int index) { if (index == 0) { return super.getMessage(); } return delegate.getMessage(index); }
/** * You can also modify the body of this method to customize your error messages. * For example, cases like LOOP_DETECTED and INVALID_LEXICAL_STATE are not * of end-users concern, so you can return something like : * * "Internal Error : Please file a bug report .... " * * from this method for such cases in the release version of your parser. */ public String getMessage() { return super.getMessage(); }
@ExceptionHandler public void myPath2(Error err, HttpServletResponse response) throws IOException { response.getWriter().write(err.getMessage()); } }
/** * Gets the text fully marked up by {@link ChangeLogAnnotator}. */ public String getMsgAnnotated() { MarkupText markup = new MarkupText(getMsg()); for (ChangeLogAnnotator a : ChangeLogAnnotator.all()) try { a.annotate(parent.run, this, markup); } catch(Exception e) { LOGGER.info("ChangeLogAnnotator " + a.toString() + " failed to annotate message '" + getMsg() + "'; " + e.getMessage()); } catch(Error e) { LOGGER.severe("ChangeLogAnnotator " + a.toString() + " failed to annotate message '" + getMsg() + "'; " + e.getMessage()); } return markup.toString(false); }
public static void main(String arg[]) throws java.io.IOException { String s = "test string..."; Foo f = new Foo("let's"); Bar b = new Bar("try"); try { test(s, f, b); } catch (Error e) { System.out.println(e.getMessage()); } } }
@MessageExceptionHandler public void handleErrorWithHandlerMethodArg(Error ex, HandlerMethod handlerMethod) { this.method = "handleErrorWithHandlerMethodArg"; this.arguments.put("handlerMethod", handlerMethod); assertEquals("my cause", ex.getMessage()); }
@Test public void addToQueue_submits_runnable_that_fails_if_Runnable_argument_throws_Error() { Error expected = new Error("Faking an exception thrown by Runnable argument"); Runnable runnable = () -> { throw expected; }; expectedException.expect(Error.class); expectedException.expectMessage(expected.getMessage()); underTest.addToQueue(runnable); } }