Class UserException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- com.mendix.systemwideinterfaces.MendixRuntimeException
-
- com.mendix.systemwideinterfaces.core.UserException
-
- All Implemented Interfaces:
java.io.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:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classUserException.ExceptionCategoryDefines the available exception categories.
-
Constructor Summary
Constructors Constructor Description UserException(DataValidationInfo dvInfo)Create a new UserException (data validation).UserException(UserException.ExceptionCategory category, java.lang.String message)Creates a new user exception with the specified message and category.UserException(UserException.ExceptionCategory category, java.lang.String message, java.lang.Throwable cause)Creates a new user exception with the specified message, cause and category.UserException(UserException.ExceptionCategory category, java.lang.Throwable cause)Creates a new user exception with the specified cause and category.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.ThrowablefillInStackTrace()Prevents this exception from generating a stack trace.UserException.ExceptionCategorygetCategory()Returns the exception category.DataValidationInfogetDataValidationFeedback()Returns data validation info, containing validation errors.java.lang.StringtoString()Returns ether the exception message, or data validation errors if they are present.
-
-
-
Constructor Detail
-
UserException
public UserException(UserException.ExceptionCategory category, java.lang.String message)
Creates a new user exception with the specified message and category.- Parameters:
message- the exception messagecategory- the exception category
-
UserException
public UserException(UserException.ExceptionCategory category, java.lang.Throwable cause)
Creates a new user exception with the specified cause and category.- Parameters:
cause- the exception that caused this exceptioncategory- the exception category
-
UserException
public UserException(UserException.ExceptionCategory category, java.lang.String message, java.lang.Throwable cause)
Creates a new user exception with the specified message, cause and category.- Parameters:
message- the exception messagecause- the exception that caused this exceptioncategory- the exception category
-
UserException
public UserException(DataValidationInfo dvInfo)
Create a new UserException (data validation).- Parameters:
dvInfo- the data validation info
-
-
Method Detail
-
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 java.lang.Throwable fillInStackTrace()
Prevents this exception from generating a stack trace. Makes the creation of this exception 10 times faster!- Overrides:
fillInStackTracein classjava.lang.Throwable
-
toString
public java.lang.String toString()
Returns ether the exception message, or data validation errors if they are present.- Overrides:
toStringin classjava.lang.Throwable- Returns:
- data validation errors if they are present, or the exception message otherwise
-
-