Target: Class annotated with @StageDefinition or an attribute of a POJO annotated with @StageDefinition.
Description: Defines a stage that will be used for redirection if a business exception is raised on the annotated stage. When used on attributes allows the definition of several error stages (one per each attribute) and allows flow control. When used on the class the redirection is automatic.
Remarks: This annotation must not be used with @ErrorView.
If used on an attribute it must be of type ViewObject.
JavaDoc: Click here
Attributes:
Name | Description | Data type | Required | Default value |
target | The ID of the stage to redirect to. | String | Yes | - |
exceptions | Comma-separated list of the FQNs of the exceptions associated with the injected stage. | String | No | java.lang.Exception |
Example:
public class aStage { @ErrorStage(target="anotherStage", exceptions="my.package.MyException, my.package.MyOtherException") IStage errorStage ... }
See also: