आम लिस्प में एक चर *debugger-hook* है, जिसे किसी फ़ंक्शन पर बाध्य/सेट किया जा सकता है।
* (aref "123" 10)
debugger invoked on a SB-INT:INVALID-ARRAY-INDEX-ERROR:
Index 10 out of bounds for (SIMPLE-ARRAY CHARACTER
(3)), should be nonnegative and <3.
Type HELP for debugger help, or (SB-EXT:QUIT) to exit from SBCL.
restarts (invokable by number or by possibly-abbreviated name):
0: [ABORT] Exit debugger, returning to top level.
(SB-INT:INVALID-ARRAY-INDEX-ERROR "123" 10 3 NIL)
0] 0
* (defun debug-ignore (c h) (declare (ignore h)) (print c) (abort))
DEBUG-IGNORE
* (setf *debugger-hook* #'debug-ignore)
#<FUNCTION DEBUG-IGNORE>
* (aref "123" 10)
#<SB-INT:INVALID-ARRAY-INDEX-ERROR {1002A661D1}>
*
स्रोत
2010-06-19 07:13:20
यह बहुत अच्छा काम करता है, मुझे यकीन है कि एक दिन मुझे डीबगर की आवश्यकता होगी लेकिन चीजों का परीक्षण करने के लिए यह अभी थोड़ा परेशान है :) धन्यवाद उत्तर के लिए – nkassis