Topic: exception handling by recovery block or rescue clause

topics > computer science > programming > Group: exception handling

error safe systems
exception handling with resumption
exception handling by termination
exception handling by try..catch
object-defined exception handling
resourceful, redundant systems for reliability


Exception handlers may be procedure alternatives used when the procedure fails. This parallels redundant machines for a critical computer. Recovery blocks become complex if procedures have side effects which must be undone before the recovery block is entered. (cbb 5/80)
Subtopic: handling failure up

Quote: on failure, silently ignore the request, admit failure, resign, retry, alternative action, or appeal to a higher authority [»wirfR7_2006]

Subtopic: recovery block up

Quote: a recovery block is an alternative block for a normal block; backtrack state if invoked [»randB6_1975]
Quote: separate unexpected errors and their correction from normal code [»parnDL10_1976b]
Quote: use checked exceptions when recovery is possible; use run-time exceptions for programming errors [»blocJ_2001]

Subtopic: restart up

Quote: recovery by restarting a device driver; most problems are rare or due to timing [»taneAS5_2006]

Subtopic: every expression a defined result up

Quote: in NIL, an exception invokes an exception handler; this gives every statement a defined result; undefined is impossible [»stroRE5_1985]

Subtopic: forward vs. backward error recovery up

Quote: need backward error recovery to reset a system and forward error recovery to patch up the damage [»smitJM1_1981]
Quote: forward error recovery needed if error discovered after commitment; need a data dictionary to determine effected programs [»smitJM1_1981]

Subtopic: rescue clause -- restores contract up

Quote: Eiffel's rescue clause handles an error by restoring the class invariant, and if resumption, the routine's precondition; unlike recovery blocks [»meyeB10_1992]
Quote: failure of a routine occurs when it can't fulfill its specification; use rescue clauses for resumption or organized panic [»meyeB10_1992]
Quote: an exception occurs when a strategy for fulfilling a routine's contract fails

Subtopic: variants and assertions up

Quote: an exception handler defines interpreted extensions to handle variants and exceptional data [»borgA10_1986]
Quote: handle exceptional subclasses and instances by exception handling triggered by the exceptional data [»borgA10_1986]
Quote: a multi-exit statement includes labels for alternative actions and assertions for program proving [»backRJ11_1979, OK]

Subtopic: use recovery to determine cause up

Quote: determine cause of an undesired event by trying several recovery actions; starting with the least expensive one [»parnDL10_1976b]
Quote: checked exceptions should include methods that describe the context and cause of the error; assist with recovery [»blocJ_2001]
Quote: use checked exceptions for multiple, necessary exceptions that allow recovery [»blocJ_2001]

Subtopic: finalizing object up

Quote: if a fictitious block for each declaration then exceptions can finalize the object before reraising the exception [»schwRL3_1981]

Subtopic: retry after backoff up

Quote: solved problem of occasional process failure in Unix by repeated retries at increasing lengths of time [»doloTA7_1978]

Subtopic: operator exception handlers up

Quote: Numerical Turing attaches exception handling to operators; modifies its definition; can use names like 'overflow' [»hullTE9_1988]
Quote: in Numerical Turing attach an exception handler by appending '@handlerId' to an operator [»hullTE9_1988]
Quote: an exception handler has the same scope as the operator it is attached to; acts like textual substitution, e.g., 'return'

Related Topics up

Topic: backtracking (30 items)
Topic: continuation (16 items)
Topic: error safe systems (76 items)
Topic: exception handling with resumption (31 items)
Topic: exception handling by termination (16 items)
Topic: exception handling by try..catch (53 items)
Topic: object-defined exception handling (10 items)
Topic: resourceful, redundant systems for reliability
(38 items)

Updated barberCB 1/06
Copyright © 2002-2008 by C. Bradford Barber. All rights reserved.
Thesa is a trademark of C. Bradford Barber.