Class TechnicalErrorUserException

    • Constructor Detail

      • TechnicalErrorUserException

        public TechnicalErrorUserException​(Throwable cause)
        The constructor.
        Parameters:
        cause - is the cause.
      • TechnicalErrorUserException

        public TechnicalErrorUserException​(NlsMessage message,
                                           Throwable nested)
        The constructor for the very special case that you want to define a custom message. You are not encouraged to use this constructor. Please also consider that you can still customize the localized texts for the message when using TechnicalErrorUserException(Throwable).
        Parameters:
        nested - is the cause.
        message - is a custom message.
    • Method Detail

      • getCode

        public final String getCode()
        Description copied from class: ApplicationException
        This method gets the code that identifies the detailed type of this object. While UUID is unique per instance of a ApplicationException this code is a short and readable identifier representing the ApplicationException Class. The default implementation returns the simple name. However, the code should remain stable after refactoring (so at least after the rename the previous code should be returned as String literal). This code may be used as a compact identifier to reference the related problem or information as well as for automatic tests of error situations that should remain stable even if the message text gets improved or the locale is unknown.
        Overrides:
        getCode in class ApplicationException
        Returns:
        the error code.
      • isTechnical

        public final boolean isTechnical()
        Description copied from class: ApplicationException
        Determines if this is a technical exception.
        • A technical exception is an unexpected situation that is to be logged on error level and should be analyzed by the operators or software developers of the system. Further in such case the end-user can typically do nothing about the problem (except to retry his operation) and will typically not understand the problem. Therefore a generic message should be displayed to the end-user in such case.
        • A non technical exception is called user failure. It is an undesired but NOT abnormal situation (e.g. a mandatory field was not filled). It should be logged on a level less than error (typically info). The message is typically intended for to end-users and has to be easy to understand.
        This separation is intentionally not done via inheritance of technical and business exception base classes to allow reuse. However, if you want to have it this way, create such classes on your own derived from this class.
        Overrides:
        isTechnical in class ApplicationException
        Returns:
        true if this is a technical exception, false if this is a user error.
        See Also:
        ApplicationException.isForUser()
      • isForUser

        public final boolean isForUser()
        Description copied from class: ApplicationException
        Note: Please consider using net.sf.mmm.nls.exception.NlsException with i18n support in case you are creating exceptions for end-users.
        Overrides:
        isForUser in class ApplicationException
        Returns:
        true if the message of this exception is for end-users (or clients), false otherwise (for internal technical errors).