[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[shepherd] 01/05: support: Remove now-unused ‘caught-error’ procedure.
From: |
Ludovic Courtès |
Subject: |
[shepherd] 01/05: support: Remove now-unused ‘caught-error’ procedure. |
Date: |
Fri, 10 May 2024 19:04:30 -0400 (EDT) |
civodul pushed a commit to branch devel
in repository shepherd.
commit bc62d5ae66444c53a5c631d6a32ec82a0271856c
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Thu May 9 23:23:38 2024 +0200
support: Remove now-unused ‘caught-error’ procedure.
* modules/shepherd/support.scm (caught-error): Remove.
* doc/shepherd.texi (Errors): Remove it.
---
doc/shepherd.texi | 7 -------
modules/shepherd/support.scm | 18 +-----------------
2 files changed, 1 insertion(+), 24 deletions(-)
diff --git a/doc/shepherd.texi b/doc/shepherd.texi
index d6c7700..aa8b4d6 100644
--- a/doc/shepherd.texi
+++ b/doc/shepherd.texi
@@ -2058,13 +2058,6 @@ If @var{expr} yields @code{#f}, display an appropriate
error
message and throw an @code{assertion-failed} exception.
@end deffn
-@deffn {Procedure} caught-error key args
-Tell the Shepherd that a @var{key} error with @var{args} has occurred. This is
-the simplest way to cause caught error result in uniformly formatted
-warning messages. The current implementation is not very good,
-though.
-@end deffn
-
@cindex system errors
@deffn {macro} without-system-error expr@dots{}
Evaluates the @var{expr}s, not going further if a system error occurs,
diff --git a/modules/shepherd/support.scm b/modules/shepherd/support.scm
index 1f16bcd..65b6ed0 100644
--- a/modules/shepherd/support.scm
+++ b/modules/shepherd/support.scm
@@ -27,8 +27,7 @@
#:use-module (ice-9 format)
#:autoload (srfi srfi-1) (take)
#:use-module (srfi srfi-9)
- #:export (caught-error
- assert
+ #:export (assert
let-loop
ring-buffer
@@ -76,21 +75,6 @@
verify-dir))
-;; Report the caught error.
-;; FIXME: Needs some more work.
-(define (caught-error key args)
- (case key
- ((wrong-number-of-args)
- (apply (lambda (subr fmt fmt-args data)
- (format #t "In ~a: " subr)
- (apply format #t fmt fmt-args)
- (newline))
- args))
- (else
- (display key)
- (write args)
- (newline))))
-
(define-syntax assert
(lambda (s)
"Assert that expression @var{exp} does not evaluate to @code{#f}."