Aktuelle Änderungen Printable View Änderungen Bearbeiten
PythonWeb > Smalltalk > ClojureVs > ScottMckay > CommonLisp > Lisp > LightPress > ScreenCast > PaulGraham > RichHickey > InterMap > EuroPython > ModRewrite > Htaccess > WebService > WebServices > ConditionsClear TrailConditions are a generalization of exceptions. When a condition arises, an appropriate condition handler is searched for and selected, in stack order, to handle the condition. Conditions which do not represent errors may safely go unhandled entirely; their only purpose may be to propagate hints or warnings toward the user.
Condition handling moreover provides a separation of mechanism from policy. Restarts provide various possible mechanisms for recovering from error, but do not select which mechanism is appropriate in a given situation. That is the province of the condition handler, which (since it is located in higher-level code) has accessible to it a broader view.
So instead of simply exiting with an error, the function may establish restarts offering various ways to continue [...] The restarts offered constitute the mechanisms available for recovering from error; the selection of restart by the condition handler supplies the policy.