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:
java.io.Serializable
- Direct Known Subclasses:
FormFieldException
@NotThreadSafe public class FormException extends java.lang.RuntimeException
Exception thrown when a form is invalid. Problems with a specific form field should useFormFieldException
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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description FormException(java.lang.String userMessage)
Creates a newFormException
FormException(java.lang.String userMessage, java.lang.Throwable cause)
Creates a newFormException
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getMessage()
Returns an error message that's safe to display to the user.
-
-
-
Constructor Detail
-
FormException
public FormException(@Detainted java.lang.String userMessage)
Creates a newFormException
- Parameters:
userMessage
- should be a friendly message that's safe to show to the user.
-
FormException
public FormException(@Detainted java.lang.String userMessage, java.lang.Throwable cause)
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.
-
-