Evaluates the given expression and then runs the on_success, on_error, or on_warning
expressions depending on the result of the initial evaluation.
Arguments
- expr
Expression to evaluate
- on_success
Expression to evaluate if
exprsucceeds. Evaluated afterexprcompletes; conditions it signals are not caught byon_errororon_warning.- on_error
Expression to evaluate if
exprgenerates an error- on_warning
Expression to evaluate if
exprgenerates a warning- finally
Expression to evaluate after
exprandon_successoron_errororon_warning, usually used for cleanup.