Package webwork.action
Class ResultException
java.lang.Object
java.lang.Throwable
java.lang.Exception
webwork.action.ResultException
- All Implemented Interfaces:
Serializable
If Actions throw this exception from execute(), the dispatcher will show the view corresponding to the chosen
result.
This is primarily useful for certain types of checking. For example, if an action can only be executed if the client
is logged in, he can have a method "checkLogin", which checks the login status and throws ResultException if not
logged in. The view would then be the login screen, and "checkLogin" should be called first in the action's execute()
method.
- Version:
- $Revision: 1.7 $
- Author:
- Rickard Öberg (rickard@middleware-company.com), Matt Baldree (matt@smallleap.com)
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionResultException(String aResult) ResultException(String aResult, String message) -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
ResultException
-
ResultException
- Parameters:
aResult- the result view; i.e. - ERROR, INPUT, etcmessage- the error message
-
-
Method Details
-
getResult
-
getMessage
- Overrides:
getMessagein classThrowable
-