(let ((msg (string-join (cons "~A" (make-list (length args) "~S")))))
(scm-error 'misc-error #f msg (cons message args) #f)))))
-;; bad-throw is the hook that is called upon a throw to a an unhandled
-;; key (unless the throw has four arguments, in which case
-;; it's usually interpreted as an error throw.)
-;; If the key has a default handler (a throw-handler-default property),
-;; it is applied to the throw.
-;;
-(define (bad-throw key . args)
- (let ((default (symbol-property key 'throw-handler-default)))
- (or (and default (apply default key args))
- (apply error "unhandled-exception:" key args))))
-
\f
(define (tm:sec obj) (vector-ref obj 0))
;;;; (ice-9 debugger commands) -- debugger commands
-;;; Copyright (C) 2002, 2006, 2009 Free Software Foundation, Inc.
+;;; Copyright (C) 2002, 2006, 2009, 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 debugger commands)
#:use-module (ice-9 debug)
+ #:use-module ((ice-9 scm-style-repl) #:select (bad-throw))
#:use-module (ice-9 debugger)
#:use-module (ice-9 debugger state)
#:use-module (ice-9 debugger utils)
closure?
%nil
@bind
+ bad-throw
error-catching-loop
error-catching-repl
scm-style-repl
(setter mod iface)
(module-define! mod '%module-public-interface iface))))
+(define (bad-throw key . args)
+ (issue-deprecation-warning
+ "`bad-throw' in the default environment is deprecated.
+Find it in the `(ice-9 scm-style-repl)' module instead.")
+ (apply (@ (ice-9 scm-style-repl) bad-throw) key args))
+
(define (error-catching-loop thunk)
(issue-deprecation-warning
"`error-catching-loop' in the default environment is deprecated.
(define-module (ice-9 scm-style-repl)
;; #:replace, as with deprecated code enabled these will be in the root env
- #:replace (error-catching-loop
+ #:replace (bad-throw
+ error-catching-loop
error-catching-repl
scm-style-repl))
+;; bad-throw is the hook that is called upon a throw to a an unhandled
+;; key (unless the throw has four arguments, in which case
+;; it's usually interpreted as an error throw.)
+;; If the key has a default handler (a throw-handler-default property),
+;; it is applied to the throw.
+;;
+(define (bad-throw key . args)
+ (let ((default (symbol-property key 'throw-handler-default)))
+ (or (and default (apply default key args))
+ (apply error "unhandled-exception:" key args))))
+
+\f
+
(define (error-catching-loop thunk)
(let ((status #f)
(interactive #t))