Changeset 15600 in project for chicken


Ignore:
Timestamp:
08/28/09 09:42:29 (10 years ago)
Author:
felix winkelmann
Message:

added get-condition-property

Location:
chicken/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • chicken/trunk/chicken-syntax.scm

    r15074 r15600  
    165165            (##sys#error
    166166             ,msg
    167              (,%quote ,exp)
    168167             ,@(if (fx> (length msg-and-args) 1)
    169168                   (cdr msg-and-args)
  • chicken/trunk/chicken.import.scm

    r15119 r15600  
    128128   get
    129129   get-call-chain
     130   get-condition-property
    130131   get-environment-variable
    131132   get-keyword
  • chicken/trunk/library.scm

    r15583 r15600  
    37953795                   [else (car err-def)] ) ) ) ) ) )
    37963796
     3797(define get-condition-property
     3798  (let ((condition-property-accessor condition-property-accessor))
     3799    (lambda (c kind prop . err-def)
     3800      (apply (condition-property-accessor kind prop err-def) c))))
     3801
    37973802
    37983803;;; Error hook (called by runtime-system):
  • chicken/trunk/manual/Unit library

    r15001 r15600  
    427427command).
    428428
     429
     430==== get-condition-property
     431
     432<procedure>(get-condition-property CONDITION KIND PROPERTY [DEFAULT])</procedure>
     433
     434A slightly more convenient condition property accessor, equivalent to
     435
     436  ((condition-property-accessor KIND PROPERTY [DEFAULT]) CONDITION)
     437
     438
     439==== System conditions
     440
    429441All error-conditions signaled by the system are of kind {{exn}}.
    430442The following composite conditions are additionally defined:
  • chicken/trunk/types.db

    r15527 r15600  
    325325(get (procedure get (symbol symbol) *))
    326326(get-call-chain (procedure get-call-chain (#!optional fixnum *) list))
     327(get-condition-property (procedure get-condition-property ((struct condition) symbol symbol #!optional *) *))
    327328(get-environment-variable (procedure get-environment-variable (string) *))
    328329(get-keyword (procedure get-keyword (symbol list #!optional *) *))
Note: See TracChangeset for help on using the changeset viewer.