Class ErrorMessage


  • public class ErrorMessage
    extends Message.Response
    Message to indicate an error to the client.
    • Method Detail

      • fromException

        public static ErrorMessage fromException​(java.lang.Throwable e)
      • fromException

        public static ErrorMessage fromException​(java.lang.Throwable e,
                                                 com.google.common.base.Predicate<java.lang.Throwable> unexpectedExceptionHandler)
        Parameters:
        e - the exception
        unexpectedExceptionHandler - a callback for handling unexpected exceptions. If null, or if this returns false, the error is logged at ERROR level via sl4fj
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class Message
      • wrap

        public static java.lang.RuntimeException wrap​(java.lang.Throwable t,
                                                      int streamId)