Topic: backtracking
Topic: exception handling by recovery block or rescue clause
Topic: exception handling by termination
Topic: interrupt handler
Topic: monitored statements and events
Topic: procedure valued variables
| |
Summary
Error handlers may be asynchronously called procedures which allow resumption of the exception signaling module. An example is PL/1's ON statement. If execution is resumed the exception is non-fatal. Similar control is provided by breakpoints, monitors, and procedure termination signalers.
Exception handling allowing resumption creates conceptual difficulties because the exception handler is defined by the caller yet executed by the called. The exception handler is then an un-controlled implicit parameter to the called module. The exception handler may execute in the module's environment. This provides access to a module's data objects before they are destroyed. (cbb 5/80)
Subtopic: resume after error
Quote: resumption model: handler is an implicit parameter of the signaler; its arguments are defined in the caller's environment [»liskBH11_1979]
| Quote: need to continue computation after an error when lots of computation, 'unclean state', or interactive debugging [»teitW3_1977]
| Quote: after recompiling a method within a Smalltalk breakpoint, can restart execution of any method on the stack [»teslL8_1981]
| Quote: throwing error propagation returns to the handler using stack unwinding while resuming propagation returns to the raise, if possible [»buhrPA9_2000]
| QuoteRef: rtl2 ;;non-fatal errors by procedure and fatal by trapping
| Quote: handle errors and interrupts by a procedure for jumping to any label, or exiting any called procedure and returning a value [»wegbB_1971, OK]
| Quote: recall(p,x) is equivalent to leave(p,p(x)); it replaces the most recent activation with a new one [»thimH2_1980]
| Quote: exception handlers can invoke 'nextstatement' to skip a statement and 'substitute' to resume execution with some value [»hullTE9_1988]
| 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]
| QuoteRef: goodJB12_1975 ;;688 exceptions ESCAPE must terminate, NOTIFY may not terminate, and SIGNAL may do either-- these are both exception types and explicit exception indicators
| QuoteRef: goodJB12_1975 ;;690 RESUME continues execution at statement following exception signaling
| QuoteRef: goodJB12_1975 ;;691 CLEANUP handler can be attached to any SIGNAL statement to be executed if SIGNAL handler EXITS
| QuoteRef: bateF_1970 ;;256 in line error handling ON allows both trapping and interception because of proper embedding-- i.e. literal specification
| Subtopic: restart
Quote: restarts and scheduling is easy with data flow because variable usage is unique; determines ordering [»hamiM3_1976, OK]
| Quote: create files in stages so that incomplete files are automatically deleted on system restart [»redeDD2_1980]
| Quote: avoid domino effect by saving good intermediate data for reading by a later process that needs to restart [»russDL3_1980]
| Quote: recovery by restarting a device driver; most problems are rare or due to timing [»taneAS5_2006]
| Subtopic: standard handler
QuoteRef: bobrDG9_1974 ;;158 "demon" module automatically activated under certain conditions
| Subtopic: interruptible iterator
Quote: interruptible iterators allow updates to the underlying collection; efficient, easier to use [»liuJ1_2006]
| Subtopic: on-the-fly correction
Quote: detect violations of design rules by instrumenting the code using a static alias analysis; can correct erroneous executions on the fly [»martM10_2005]
| Subtopic: use for monitoring
QuoteRef: goodJB12_1975 ;;685 exceptions may be used for monitoring an operation (resume ability) for additional information
| Subtopic: errors handled by subroutine
QuoteRef: goodJB12_1975 ;;688 exceptions handled (if implicit) on a subroutine basis
| Subtopic: resume until success
Quote: continually recalls the expression parser until the user correctly modifies the expression [»thimH2_1980]
| Subtopic: non-fatal errors
QuoteRef: memorex ;;10-12 fatal and non-fatal error messages can be generated
| Subtopic: restrictions to resumption
Quote: consequential propagation prevents recursive resuming of exceptions; if a handler cannot handle an event then it should not handle its consequent events [»buhrPA9_2000]
| Subtopic: problems with resumption
Quote: with the resumption model, exception signalers and handlers are mutually dependent; each depend on the other for satisfying a relation [»liskBH11_1979]
| Quote: use termination instead of resumption for exception handling: simpler, discourages resource allocation attempts, resumption is not necessary [»stroB_1994]
| Quote: on resource exhaustion, do not attempt to allocate needed resources and resume. It leads to complicated interactions between a library and its users
| Quote: despite having resumption in Cedar/Mesa, every use of resumption become a problem and a better design replaced it [»stroB_1994]
| Quote: recursive resuming may occur when resuming with exception handlers in previous scopes; only criticism of resuming propagation [»buhrPA9_2000]
| Quote: Mesa prevents recursive resuming by entering a handler only once; can lead to odd behavior [»buhrPA9_2000]
|
Related Topics
Topic: backtracking (30 items)
Topic: exception handling by recovery block or rescue clause (22 items)
Topic: exception handling by termination (16 items)
Topic: interrupt handler (20 items)
Topic: monitored statements and events (16 items)
Topic: procedure valued variables (34 items)
|