Package google.registry.ui.forms
Class FormException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
google.registry.ui.forms.FormException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
FormFieldException
Exception thrown when a form is invalid. Problems with a specific
form field should use
FormFieldException
instead.
You can safely throw FormException
from within your form
validator, and the message will automatically be propagated to the
client form interface.
- See Also:
-
Constructor Summary
ConstructorDescriptionFormException
(String userMessage) Creates a newFormException
FormException
(String userMessage, Throwable cause) Creates a newFormException
-
Method Summary
Modifier and TypeMethodDescriptionReturns an error message that's safe to display to the user.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
FormException
Creates a newFormException
- Parameters:
userMessage
- should be a friendly message that's safe to show to the user.
-
FormException
Creates a newFormException
- Parameters:
userMessage
- should be a friendly message that's safe to show to the user.cause
- the original cause of this exception. May be null.
-
-
Method Details
-
getMessage
Returns an error message that's safe to display to the user.- Overrides:
getMessage
in classThrowable
-