diff options
| author | 2025-04-13 16:03:35 -0400 | |
|---|---|---|
| committer | 2025-04-13 16:03:35 -0400 | |
| commit | 7277f4420d933b9710b645d61a8139e8e06c7102 (patch) | |
| tree | ae291b0ea13cf3e9272745104f59ca889345fc9f /lowlevel.scm | |
| parent | add chicken release-info (diff) | |
use more specific exceptions0.9.1
Diffstat (limited to 'lowlevel.scm')
| -rw-r--r-- | lowlevel.scm | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/lowlevel.scm b/lowlevel.scm index 21bfba8..e6bb9c5 100644 --- a/lowlevel.scm +++ b/lowlevel.scm @@ -102,6 +102,10 @@ C_return(closure); ;; does not exist. This relies on an undocumented internal function, ;; although it could be implemented with documented functions. (cond + ((not (procedure? proc)) (abort + (make-property-condition 'type + 'message + "not a procedure"))) ((##sys#lambda-decoration proc decoration-is-tag?) => cdr) (else #f))) @@ -113,18 +117,13 @@ C_return(closure); ;; Return a new closure object that is tagged, has all of its previous ;; tags except that `key` maps to `value`. (cond - ((not (procedure? proc)) (raise - (make-property-condition '(srfi-259 assertion-violation) - 'message - "not a procedure" - 'arguments - (list proc key value)))) ((get-mapping proc) => (lambda (oldmap) (set-signifier-pair proc unique-symbol (make-signifier (fxmapping-set oldmap key value))))) + ;; get-mapping will test if `proc` is a procedure (else (create/signifier-pair proc (make-signifier (fxmapping key value)))))) |
