;;; {Running Repls}
;;;
-(define (default-pre-unwind-handler key . args)
- ;; Narrow by two more frames: this one, and the throw handler.
- (save-stack 2)
- (apply throw key args))
-
(define abort-hook (make-hook))
;; Programs can call `batch-mode?' to see if they are running as part of a
#:use-module (ice-9 debugger state)
#:use-module (ice-9 debugger utils)
#:use-module (ice-9 debugging traps)
+ #:use-module (ice-9 scm-style-repl)
#:use-module (ice-9 format)
#:export (debug-stack
debug
(define-module (ice-9 debugging traps)
#:use-module (ice-9 regex)
#:use-module (ice-9 weak-vector)
+ #:use-module (ice-9 scm-style-repl)
#:use-module (oop goops)
#:use-module (oop goops describe)
#:use-module (ice-9 debugging trc)
set-repl-prompt!
set-batch-mode?!
repl
- pre-unwind-handler-dispatch)
+ pre-unwind-handler-dispatch
+ default-pre-unwind-handler)
#:replace (module-ref-submodule module-define-submodule!))
(define (pre-unwind-handler-dispatch key . args)
(issue-deprecation-warning
"`pre-unwind-handler-dispatch' is deprecated. Use
-`default-pre-unwind-handler' directly.")
- (apply default-pre-unwind-handler key args))
+`default-pre-unwind-handler' from `(ice-9 scm-style-repl)' directly.")
+ (apply (@ (ice-9 scm-style-repl) default-pre-unwind-handler) key args))
+
+(define (default-pre-unwind-handler key . args)
+ (issue-deprecation-warning
+ "`default-pre-unwind-handler' is deprecated. Use it from
+`(ice-9 scm-style-repl)' if you need it.")
+ (apply (@ (ice-9 scm-style-repl) default-pre-unwind-handler) key args))
assert-repl-print-unspecified
assert-repl-verbosity
+ default-pre-unwind-handler
bad-throw
error-catching-loop
error-catching-repl
\f
+(define (default-pre-unwind-handler key . args)
+ ;; Narrow by two more frames: this one, and the throw handler.
+ (save-stack 2)
+ (apply throw key args))
+
+\f
+
(define (error-catching-loop thunk)
(let ((status #f)
(interactive #t))
;;; installed-scm-file
-;;;; Copyright (C) 2001, 2006 Free Software Foundation, Inc.
+;;;; Copyright (C) 2001, 2006, 2010 Free Software Foundation, Inc.
;;;;
;;;; This library is free software; you can redistribute it and/or
;;;; modify it under the terms of the GNU Lesser General Public
;;;;
(define-module (ice-9 stack-catch)
- :export (stack-catch))
+ #:export (stack-catch))
(define (stack-catch key thunk handler)
"Like @code{catch}, invoke @var{thunk} in the dynamic context of
(catch key
thunk
handler
- default-pre-unwind-handler))
+ (lambda (key . args)
+ ;; Narrow by two more frames: this one, and the throw handler.
+ (save-stack 2)
+ (apply throw key args))))