Added &undefined condition to unbound error conditions.

This commit is contained in:
Abdulaziz Ghuloum 2008-07-29 07:54:06 -07:00
parent d84dd99061
commit c0a1abace1
2 changed files with 10 additions and 10 deletions

View File

@ -54,9 +54,13 @@
(die 'top-level-value "not a symbol" x))
(let ([v ($symbol-value x)])
(when ($unbound-object? v)
(die 'eval "unbound variable"
(string->symbol
(symbol->string x))))
(raise
(condition
(make-undefined-violation)
(make-who-condition 'eval)
(make-message-condition "unbound variable")
(make-irritants-condition
(list (string->symbol (symbol->string x)))))))
v)))
(define top-level-bound?
@ -104,12 +108,8 @@
(if (procedure? v)
v
(lambda args
(let ([v ($symbol-value x)])
(if ($unbound-object? v)
(die 'eval "unbound variable"
(string->symbol
(symbol->string x)))
(die 'apply "not a procedure" v)))))))))
(die 'apply "not a procedure"
(top-level-value x))))))))
(define string->symbol
(lambda (x)

View File

@ -1 +1 @@
1558
1559