Class UserException

All Implemented Interfaces:
Serializable
Direct Known Subclasses:
AuthenticationRuntimeException

public class UserException extends MendixRuntimeException
Represents an exception for reporting messages to user. This exception doesn't provide a stacktrace, which makes its creation 10 times faster!
See Also:
  • Constructor Details

    • UserException

      public UserException(UserException.ExceptionCategory category, String message)
      Creates a new user exception with the specified message and category.
      Parameters:
      category - the exception category
      message - the exception message
    • UserException

      public UserException(UserException.ExceptionCategory category, Throwable cause)
      Creates a new user exception with the specified cause and category.
      Parameters:
      category - the exception category
      cause - the exception that caused this exception
    • UserException

      public UserException(UserException.ExceptionCategory category, String message, Throwable cause)
      Creates a new user exception with the specified message, cause and category.
      Parameters:
      category - the exception category
      message - the exception message
      cause - the exception that caused this exception
    • UserException

      public UserException(DataValidationInfo dvInfo)
      Create a new UserException (data validation).
      Parameters:
      dvInfo - the data validation info
  • Method Details

    • getCategory

      public UserException.ExceptionCategory getCategory()
      Returns the exception category.
      Returns:
      the category
    • getDataValidationFeedback

      public DataValidationInfo getDataValidationFeedback()
      Returns data validation info, containing validation errors.
      Returns:
      the data validation info
    • fillInStackTrace

      public Throwable fillInStackTrace()
      Prevents this exception from generating a stack trace. Makes the creation of this exception 10 times faster!
      Overrides:
      fillInStackTrace in class Throwable
    • toString

      public String toString()
      Returns ether the exception message, or data validation errors if they are present.
      Overrides:
      toString in class Throwable
      Returns:
      data validation errors if they are present, or the exception message otherwise