21 |
(invoke-debugger cnd))) |
(invoke-debugger cnd))) |
22 |
'bad) |
'bad) |
23 |
good) |
good) |
24 |
|
|
25 |
|
(deftest invoke-debugger.error.1 |
26 |
|
(classify-error (invoke-debugger)) |
27 |
|
program-error) |
28 |
|
|
29 |
|
(deftest invoke-debugger.error.2 |
30 |
|
(classify-error (invoke-debugger (make-condition 'simple-error) nil)) |
31 |
|
program-error) |
32 |
|
|
33 |
|
;;; If the debugger hook function expects the wrong number |
34 |
|
;;; of arguments, a program-error should be thrown in safe code |
35 |
|
;;; This error is thrown 'prior to entry to the standard debugger'. |
36 |
|
|
37 |
|
(deftest invoke-debugger.error.3 |
38 |
|
(classify-error |
39 |
|
(let ((*debugger-hook* #'(lambda () nil))) |
40 |
|
(invoke-debugger (make-condition 'simple-error)))) |
41 |
|
program-error) |
42 |
|
|
43 |
|
(deftest invoke-debugger.error.4 |
44 |
|
(classify-error |
45 |
|
(let ((*debugger-hook* #'(lambda (c) c))) |
46 |
|
(invoke-debugger (make-condition 'simple-error)))) |
47 |
|
program-error) |
48 |
|
|
49 |
|
(deftest invoke-debugger.error.5 |
50 |
|
(classify-error |
51 |
|
(let ((*debugger-hook* #'(lambda (c hook x) (list c hook x)))) |
52 |
|
(invoke-debugger (make-condition 'simple-error)))) |
53 |
|
program-error) |