Introduce with-inspector-handler to turn an exception into a value for the inspector
part of darcs patch Thu Sep 22 14:13:30 EEST 2005 Martin Gasbichler <gasbichl@informatik.uni-tuebingen.de>
This commit is contained in:
parent
7488bcdf18
commit
85a258237c
|
@ -17,17 +17,13 @@
|
|||
(read string-port)))
|
||||
|
||||
(define (eval-string str)
|
||||
(with-fatal-and-capturing-error-handler
|
||||
(lambda (condition raw-continuation continuation decline)
|
||||
raw-continuation)
|
||||
(with-inspector-handler
|
||||
(lambda ()
|
||||
(eval (read-sexp-from-string str)
|
||||
(evaluation-environment)))))
|
||||
|
||||
(define (eval-s-expr s-expr)
|
||||
(with-fatal-and-capturing-error-handler
|
||||
(lambda (condition raw-continuation continuation decline)
|
||||
raw-continuation)
|
||||
(with-inspector-handler
|
||||
(lambda ()
|
||||
(eval s-expr (evaluation-environment)))))
|
||||
|
||||
|
|
|
@ -207,9 +207,6 @@
|
|||
(else
|
||||
(debug-message "inspector did not handle message " message))))))
|
||||
|
||||
(register-plugin!
|
||||
(make-view-plugin make-inspector
|
||||
exception-continuation?))
|
||||
|
||||
(define-record-type inspection-object :inspection-object
|
||||
(make-inspection-object val)
|
||||
|
@ -219,4 +216,10 @@
|
|||
(register-plugin!
|
||||
(make-view-plugin (lambda (iv buffer)
|
||||
(make-inspector (inspection-object-val iv) buffer))
|
||||
inspection-object?))
|
||||
inspection-object?))
|
||||
|
||||
(define (with-inspector-handler thunk)
|
||||
(with-fatal-and-capturing-error-handler
|
||||
(lambda (condition raw-continuation continuation decline)
|
||||
(make-inspection-object (cons condition raw-continuation)))
|
||||
thunk))
|
|
@ -288,9 +288,7 @@
|
|||
|
||||
|
||||
(define (eval-command-in-scheme-mode command-line)
|
||||
(with-fatal-and-capturing-error-handler
|
||||
(lambda (condition raw-continuation continuation decline)
|
||||
raw-continuation)
|
||||
(with-inspector-handler
|
||||
(lambda ()
|
||||
(if (scheme-command-line? command-line)
|
||||
(process-scheme-command command-line)
|
||||
|
|
|
@ -433,7 +433,8 @@
|
|||
;;; inspector
|
||||
|
||||
(define-interface inspection-objects-interface
|
||||
(export make-inspection-object
|
||||
(export with-inspector-handler
|
||||
make-inspection-object
|
||||
inspection-object?))
|
||||
|
||||
(define-structures
|
||||
|
@ -451,6 +452,7 @@
|
|||
(subset srfi-13 (string-join))
|
||||
debug-data
|
||||
(subset disclosers (template-debug-data))
|
||||
inspect-exception
|
||||
|
||||
focus-table
|
||||
ncurses
|
||||
|
@ -499,7 +501,7 @@
|
|||
(open scheme
|
||||
srfi-6
|
||||
|
||||
inspect-exception
|
||||
inspection-objects
|
||||
rt-modules)
|
||||
(files eval-environment))
|
||||
|
||||
|
@ -912,7 +914,7 @@
|
|||
srfi-8
|
||||
srfi-13
|
||||
debugging
|
||||
inspect-exception
|
||||
inspection-objects
|
||||
tty-debug
|
||||
threads
|
||||
rendezvous
|
||||
|
@ -928,6 +930,7 @@
|
|||
initial-tty
|
||||
nuit-windows
|
||||
modal-window
|
||||
inspect-exception
|
||||
|
||||
configuration
|
||||
command-line-parser
|
||||
|
|
Loading…
Reference in New Issue