Hook: Adapt Standard FormSheet Error Handling
Requirement
The error handling for a strategy of one of the standard FormSheets
needs to be defined.
The standard FormSheets use strategies to allow you to modify their
reactions to user events. The error handling in all these strategies
can be defined in a uniform way.
Method of AdaptationReplace Feature
Level of SupportParameter Pattern
HotSpotStandard User Interaction
ParticipantsSpecificFormSheetStrategy
,
strategy
,
ErrorHandler,
NewHandler
,
DEFAULT_ERROR_HANDLER,
MSG_POPUP_ERROR_HANDLER
Changes
-
instance strategy of SpecificFormSheetStrategy.
-
choose: type of error handling?
-
if process must be cancelled on any error, printing an error message
to the user:
-
handler = DEFAULT_ERROR_HANDLER.
-
if an error message should appear in an extra window, but the
process should not be cancelled:
-
handler = MSG_POPUP_ERROR_HANDLER.
-
in any other case:
-
implementation NewHandler of ErrorHandler.
-
NewHandler.error implements
ErrorHandler.error
.
-
instance handler of NewHandler.
-
call
strategy.setErrorHandler
with parameter handler.