Changeset 22535 in project for gazette


Ignore:
Timestamp:
01/25/11 22:25:27 (8 years ago)
Author:
ckeen
Message:

gazette #18: rien_ found some more, thanks

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gazette/src/issues/18.wiki

    r22534 r22535  
    250250accepts any number of key / value pairs. The most basic condition
    251251signalled by the Chicken Scheme system is the ''exn'' condition kind.
    252 All ''exn'' conditions do have three properties:
     252All ''exn'' conditions have three properties:
    253253
    254254; message : Textual message explaining the error.
     
    268268         (print "He has failed again!")
    269269         (print "Something else is rotten.")))
    270 ; Prints "He has failed again!"
     270;;; Prints "He has failed again!"
    271271</enscript>
    272272
     
    279279         (print ((condition-property-accessor 'all-my-fault 'message "No message.") exn))
    280280         (print "Something else is rotten.")))
    281 ; Prints "I have failed, master!"
    282 </enscript>
    283 
    284 Note the ''"No message"'' argument, it is an extension to the SRFI-12
     281;;; Prints "I have failed, master!"
     282</enscript>
     283
     284Note that the ''"No message"'' argument is an extension to the SRFI-12
    285285procedure. It will serve as a default in case your exception does not
    286286provide the property you've asked for. If you omit the default and the
     
    299299
    300300To be able to generate more complex condition objects it is possible
    301 to combine conditions to so called ''composite-conditions''. The
    302 constructing procedure is called
     301to combine conditions to create so-called
     302''composite-conditions''. The constructing procedure is called
    303303
    304304 (make-composite-condition condition ...)
     
    392392with a file!"))''. The clauses are, like cond, matched in the order of
    393393appearance so be sure to place more special clauses first, general
    394 clauses next and an all catch ''exn ()'' clause (optionally) last. If
     394clauses next and an catch-all ''exn ()'' clause (optionally) last. If
    395395the catch all clause is omitted the exception is re-raised by
    396396condition-case.
    397397
    398 As condition-case also captures the continuation as 'handle-exception'
    399 does re-raising the condition causes this continuation's exception
     398Because condition-case captures the continuation just as 'handle-exception'
     399does, re-raising the condition causes this continuation's exception
    400400handler to get called, so that the unhandled condition is handed over
    401401to the next handler. If no handler does handle the exception, the
    402 toplevel handler will finally abort the program and prints an call
     402toplevel handler will finally abort the program and prints a call
    403403chain as well as the exn properties OR an unhandled exception message.
    404404
     
    415415''condition-object''. The other procedure ''abort'' does a little bit
    416416more than that: It calls the ''current-condition-handler'' with the
    417 ''condition-object'' then when the handler returns calls itself with a
    418 condition object signaling that the handler returned. Why?
     417''condition-object'' then when the handler returns it calls itself
     418with a condition object signaling that the handler returned. Why?
    419419
    420420=== To continue or not continue -- That's the question
Note: See TracChangeset for help on using the changeset viewer.