Class CommonException

    • Field Detail

      • userFriendlyMessage

        protected LocalizableMessage userFriendlyMessage
        User-friendly localizable detail message.
      • localizedUserFriendlyMessage

        protected String localizedUserFriendlyMessage
        User-friendly message in system locale. This value should correspond to userFriendlyMessage translated into system locale.
    • Constructor Detail

      • CommonException

        public CommonException()
      • CommonException

        public CommonException​(String technicalMessage)
      • CommonException

        public CommonException​(Throwable cause)
      • CommonException

        public CommonException​(String technicalMessage,
                               Throwable cause)
    • Method Detail

      • getErrorTypeMessage

        public abstract String getErrorTypeMessage()
        Returns a human-readable message that describes the type or class of errors that the exception represents. E.g. "Communication error", "Policy violation", etc. TODO: switch return value to a localized message
      • getUserFriendlyMessage

        public LocalizableMessage getUserFriendlyMessage()
        User-friendly (localizable) message that describes this error. The message is intended to be understood by user or system administrators. It should NOT contain any developer language (even if this is internal error).
      • getTechnicalMessage

        public String getTechnicalMessage()
      • setTechnicalMessage

        public void setTechnicalMessage​(String technicalMessage)
      • getLocalizedUserFriendlyMessage

        public String getLocalizedUserFriendlyMessage()
      • setLocalizedUserFriendlyMessage

        public void setLocalizedUserFriendlyMessage​(String localizedUserFriendlyMessage)
      • getSeverity

        @Experimental
        @NotNull
        public CommonException.Severity getSeverity()
        Not all exceptions are fatal. This method returns the (estimated) severity of this exception. The final decision is up to the exception handling code, of course. It may or may not accept this value.