GNU bug report logs -
#41956
[PATCH] ice-9: exceptions: Properly format the error message.
Previous Next
To reply to this bug, email your comments to 41956 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-guile <at> gnu.org
:
bug#41956
; Package
guile
.
(Fri, 19 Jun 2020 21:34:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-guile <at> gnu.org
.
(Fri, 19 Jun 2020 21:34:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hello,
I had this problem in Guix where 'guix deploy my-config.scm' would
unhelpfully report an error like:
guix deploy: error: failed to deploy my-host: ~A: ~S
Digging a bit, I could reproduce at the REPL with:
--8<---------------cut here---------------start------------->8---
(guard (c ((message-condition? c)
(format #t "error: ~a~%" (condition-message c))))
;; This is what (canonicalize-path "/do/not/exist) ends up doing:
(throw 'system-error "canonicalize-path" "~A" '("No such file or directory")))
--> error: ~A
--8<---------------cut here---------------end--------------->8---
It seems our native -> srfi-34 style exception converter should populate
the message field with a formatted message, given that's what happens to
present errors as explained in libguile/error.c:
When an error is reported,\n
"these are replaced by formatting the corresponding members of\n"
"@var{args}: @code{~A} (was @code{%s} in older versions of\n"
"Guile) formats using @code{display} and @code{~S}
I'm not sure about the second ~S that appeared in the Guix output;
possibly the exception got re-thrown and suffered from a slightly
different conversion problem?
Anyway, the simple patch attached should fix the "~A" exception message.
Thank you,
Maxim
[0001-ice-9-exceptions-Properly-format-the-error-message.patch (text/x-patch, attachment)]
Information forwarded
to
bug-guile <at> gnu.org
:
bug#41956
; Package
guile
.
(Sat, 20 Jun 2020 05:47:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 41956 <at> debbugs.gnu.org (full text, mbox):
Maxim Cournoyer <maxim.cournoyer <at> gmail.com> writes:
> Hello,
>
> I had this problem in Guix where 'guix deploy my-config.scm' would
> unhelpfully report an error like:
>
> guix deploy: error: failed to deploy my-host: ~A: ~S
>
> Digging a bit, I could reproduce at the REPL with:
>
> (guard (c ((message-condition? c)
> (format #t "error: ~a~%" (condition-message c))))
> ;; This is what (canonicalize-path "/do/not/exist) ends up doing:
> (throw 'system-error "canonicalize-path" "~A" '("No such file or directory")))
>
> --> error: ~A
[...]
Unfortunately the previous patch breaks the tests, with errors like:
ERROR: bytevectors.test: Datum Syntax: incorrect prefix - arguments: ((wrong-type-arg "apply" "Apply to non-list: ~S" (#\i) (#\i)))
I'm out of ideas for now, I last tried:
--8<---------------cut here---------------start------------->8---
modified module/ice-9/exceptions.scm
@@ -189,7 +189,10 @@
((subr msg margs . _)
(make-exception
(make-exception-with-origin subr)
- (make-exception-with-message msg)
+ (let ((msg (if (null? margs)
+ msg
+ (apply simple-format #f msg margs))))
+ (make-exception-with-message msg))
(make-exception-with-irritants margs)))
(_ (make-exception-with-irritants args)))
args))
--8<---------------cut here---------------end--------------->8---
To the same effect.
Maxim
Information forwarded
to
bug-guile <at> gnu.org
:
bug#41956
; Package
guile
.
(Sat, 20 Jun 2020 18:34:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 41956 <at> debbugs.gnu.org (full text, mbox):
Hi Maxim,
tl;dr:
Does module/ice-9/exceptions.scm use the default format?
Maybe (use-modules (ice-9) format) will help get to the next bug ?? :)
On +2020-06-20 01:46:13 -0400, maxim.cournoyer <at> gmail.com wrote:
> Maxim Cournoyer <maxim.cournoyer <at> gmail.com> writes:
>
> > Hello,
> >
> > I had this problem in Guix where 'guix deploy my-config.scm' would
> > unhelpfully report an error like:
> >
> > guix deploy: error: failed to deploy my-host: ~A: ~S
> >
> > Digging a bit, I could reproduce at the REPL with:
> >
> > (guard (c ((message-condition? c)
> > (format #t "error: ~a~%" (condition-message c))))
> > ;; This is what (canonicalize-path "/do/not/exist) ends up doing:
> > (throw 'system-error "canonicalize-path" "~A" '("No such file or directory")))
> >
> > --> error: ~A
>
> [...]
>
> Unfortunately the previous patch breaks the tests, with errors like:
>
> ERROR: bytevectors.test: Datum Syntax: incorrect prefix - arguments: ((wrong-type-arg "apply" "Apply to non-list: ~S" (#\i) (#\i)))
>
> I'm out of ideas for now, I last tried:
>
> --8<---------------cut here---------------start------------->8---
> modified module/ice-9/exceptions.scm
> @@ -189,7 +189,10 @@
> ((subr msg margs . _)
> (make-exception
> (make-exception-with-origin subr)
> - (make-exception-with-message msg)
> + (let ((msg (if (null? margs)
> + msg
> + (apply simple-format #f msg margs))))
> + (make-exception-with-message msg))
> (make-exception-with-irritants margs)))
> (_ (make-exception-with-irritants args)))
> args))
> --8<---------------cut here---------------end--------------->8---
>
> To the same effect.
>
> Maxim
>
>
>
HTH
--
Regards,
Bengt Richter
Information forwarded
to
bug-guile <at> gnu.org
:
bug#41956
; Package
guile
.
(Sun, 21 Jun 2020 03:50:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 41956 <at> debbugs.gnu.org (full text, mbox):
Hello Bengt!
Bengt Richter <bokr <at> bokr.com> writes:
> Hi Maxim,
>
> tl;dr:
> Does module/ice-9/exceptions.scm use the default format?
> Maybe (use-modules (ice-9) format) will help get to the next bug ?? :)
Thanks for suggesting! I tried but got the same result.
I'm now testing a slightly different version:
@@ -189,7 +189,10 @@
((subr msg margs . _)
(make-exception
(make-exception-with-origin subr)
- (make-exception-with-message msg)
+ (let ((msg (if (list? margs)
+ (apply simple-format #f msg margs)
+ msg)))
+ (make-exception-with-message msg))
(make-exception-with-irritants margs)))
(_ (make-exception-with-irritants args)))
args))
Maxim
Information forwarded
to
bug-guile <at> gnu.org
:
bug#41956
; Package
guile
.
(Thu, 25 Jun 2020 10:05:01 GMT)
Full text and
rfc822 format available.
Message #17 received at 41956 <at> debbugs.gnu.org (full text, mbox):
Hi Maxim,
here’s what I did in the REPL:
--8<---------------cut here---------------start------------->8---
scheme@(guile-user)> ,m (ice-9 exceptions)
scheme@(ice-9 exceptions)> (define (my/guile-system-error-converter key args)
(apply (case-lambda
((subr msg-args msg errno . rest)
;; XXX TODO we should return a more specific error
;; (usually an I/O error) as expected by R6RS programs.
;; Unfortunately this often requires the 'filename' (or
;; other?) which is not currently provided by the native
;; Guile exceptions.
(make-exception
(make-external-error)
(make-exception-with-origin subr)
(apply make-exception-with-message msg)
(make-exception-with-irritants msg-args)))
(_ (guile-external-error-converter key args)))
args))
scheme@(ice-9 exceptions)> (set! guile-exception-converters (acons 'system-error my/guile-system-error-converter guile-exception-converters))
scheme@(ice-9 exceptions)> ,m (guile-user)
scheme@(guile-user)> (guard (c ((message-condition? c)
(format #t "message: ~a~%" (condition-message c))))
(canonicalize-path "/doesntexist"))
message: No such file or directory
$11 = #t
scheme@(guile-user)>
--8<---------------cut here---------------end--------------->8---
--
Ricardo
Information forwarded
to
bug-guile <at> gnu.org
:
bug#41956
; Package
guile
.
(Thu, 25 Jun 2020 16:35:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 41956 <at> debbugs.gnu.org (full text, mbox):
Hi Ricardo et al,
On +2020-06-25 12:04:27 +0200, Ricardo Wurmus wrote:
>
> Hi Maxim,
>
> here’s what I did in the REPL:
>
> --8<---------------cut here---------------start------------->8---
> scheme@(guile-user)> ,m (ice-9 exceptions)
> scheme@(ice-9 exceptions)> (define (my/guile-system-error-converter key args)
> (apply (case-lambda
> ((subr msg-args msg errno . rest)
> ;; XXX TODO we should return a more specific error
> ;; (usually an I/O error) as expected by R6RS programs.
> ;; Unfortunately this often requires the 'filename' (or
> ;; other?) which is not currently provided by the native
> ;; Guile exceptions.
> (make-exception
> (make-external-error)
> (make-exception-with-origin subr)
> (apply make-exception-with-message msg)
> (make-exception-with-irritants msg-args)))
> (_ (guile-external-error-converter key args)))
> args))
> scheme@(ice-9 exceptions)> (set! guile-exception-converters (acons 'system-error my/guile-system-error-converter guile-exception-converters))
> scheme@(ice-9 exceptions)> ,m (guile-user)
> scheme@(guile-user)> (guard (c ((message-condition? c)
> (format #t "message: ~a~%" (condition-message c))))
> (canonicalize-path "/doesntexist"))
> message: No such file or directory
> $11 = #t
> scheme@(guile-user)>
> --8<---------------cut here---------------end--------------->8---
>
> --
> Ricardo
What do you think of using (ice-9 match) to make a universal throwage-formatter,
with the idea of making readable top level code for how exceptions become messages on screen?
I started a hack to explore the (throw 'whatever any ...) space, beginning like
--8<---------------cut here---------------start------------->8---
(use-modules (ice-9 match))
(define (make-exception-message key rest)
(begin
(let*((l (cons key rest)))
(match l
(('system-error subr message args data ...)
;; e.g. thrown with key 'system-error: ("open-fdes" "~A" ("No such file or directory") (2))
(format #f (string-append "match-1: subr ~s threw '~s " message " sterror: ~s") subr key args (strerror (car (car data)))))
(('signal any ...)
;; not yet implemented
(format #f "match-2: <NYI:unix signal no> any: ~s" any))
(('keyword-argument-error subr message args data)
;; with-crossed-fingers...
(format #f (string-append "match-3: subr ~s threw '~s " message) subr key args))
;; FIXME: string-append formats NAGI not a good idea, see a fix example below
(('wrong-type-arg subr message (args ...) (data ...))
;; E.g., thrown with key 'wrong-type-arg: ("sqrt" "Wrong type argument in position ~A: ~S" (1 x) (x))
(format #f "match-4: subr ~s threw '~s: ~s" subr key (format #f message args data)))
(('out-of-range subr message (lo hi bad1) ((bad2)))
;; E.g., thrown with key 'out-of-range: (#f "Value out of range ~S to ~S: ~S" (0 3 4) (4))
(format #f "match-5: (internal) threw '~s: ~s" 'out-of-range (format #f message lo hi bad2)))
(('unbound-variable #f message args data)
;; E.g. thrown with key 'unbound-variable: (#f "Unbound variable: ~S" (foo) #f)
(format #f (string-append "match-6: subr ~s threw '~s " message) #f key args)) ;; data))
;; FIXME: string-append formats NAGI
[...]
--8<---------------cut here---------------end--------------->8---
I made a guile hack that I could call from bash so I could type a line and (eval-string it) as a source of exceptions,
and found that I could get secondary exceptions from make-exception-message, so I wrapped that with a (catch ...)
something like
--8<---------------cut here---------------start------------->8---
(define verbose-exception-handler (lambda (k . rest )
(begin
(format #t "thrown with key '~s: ~s\n" k rest)
(format #t "catch return=~a\n" (catch #t
(lambda () (make-exception-message k rest))
(lambda (inner-key . inner-rest)
(format #t "caught by inner handler: thrown with key '~s: ~s\n" inner-key inner-rest))))
;; (format #t "thrown with key '~s: ~s\n" k rest)
(newline)
;;;; [...]
--8<---------------cut here---------------end--------------->8---
And using that like
--8<---------------cut here---------------start------------->8---
(define (wrap-main args)
(begin
(display (catch #t
(lambda () (apply main-defaults args))
verbose-exception-handler
))))
--8<---------------cut here---------------end--------------->8---
(main-defaults sets up missing args and calls main with fixed args plus opt rest)
I'm wondering if some of the obscure error messages I've encountered
might be secondary, and could be clarified by wrapping the primary
exception formatting similarly, (adding apropriate hint).
WDYT? And is (ice-9 match) too massive to use for memory-limited platforms?
BTW, does guile have a Content-type X-...-like standard for naming throw keys?,
e.g. 'X-longjump-result-delivery
if someone should want to use throw for non-"standard (?? :)" purposes?
--
Regards, Bengt Richter
Information forwarded
to
bug-guile <at> gnu.org
:
bug#41956
; Package
guile
.
(Sun, 28 Jun 2020 04:18:02 GMT)
Full text and
rfc822 format available.
Message #23 received at 41956 <at> debbugs.gnu.org (full text, mbox):
Hello Ricardo!
Ricardo Wurmus <rekado <at> elephly.net> writes:
> Hi Maxim,
>
> here’s what I did in the REPL:
>
> scheme@(guile-user)> ,m (ice-9 exceptions)
> scheme@(ice-9 exceptions)> (define (my/guile-system-error-converter key args)
> (apply (case-lambda
> ((subr msg-args msg errno . rest)
> ;; XXX TODO we should return a more specific error
> ;; (usually an I/O error) as expected by R6RS programs.
> ;; Unfortunately this often requires the 'filename' (or
> ;; other?) which is not currently provided by the native
> ;; Guile exceptions.
> (make-exception
> (make-external-error)
> (make-exception-with-origin subr)
> (apply make-exception-with-message msg)
> (make-exception-with-irritants msg-args)))
> (_ (guile-external-error-converter key args)))
> args))
> scheme@(ice-9 exceptions)> (set! guile-exception-converters (acons 'system-error my/guile-system-error-converter guile-exception-converters))
> scheme@(ice-9 exceptions)> ,m (guile-user)
> scheme@(guile-user)> (guard (c ((message-condition? c)
> (format #t "message: ~a~%" (condition-message c))))
> (canonicalize-path "/doesntexist"))
> message: No such file or directory
> $11 = #t
> scheme@(guile-user)>
I've tested that this indeed works, although I don't quite understand
how?
This brings embeds the definition of `guile-common-exceptions' into
`guile-system-error-converter', with a single change:
(make-exception-with-message msg) --> (apply make-exception-with-message
msg msg-args)
What is the magic I fail to see?
Is this fix proper to be merged into the original
guile-common-exceptions procedure?
Thank you!
Maxim
Information forwarded
to
bug-guile <at> gnu.org
:
bug#41956
; Package
guile
.
(Sun, 28 Jun 2020 04:26:01 GMT)
Full text and
rfc822 format available.
Message #26 received at 41956 <at> debbugs.gnu.org (full text, mbox):
Hello Bengt,
Bengt Richter <bokr <at> bokr.com> writes:
[...]
> What do you think of using (ice-9 match) to make a universal throwage-formatter,
> with the idea of making readable top level code for how exceptions become messages on screen?
>
> I started a hack to explore the (throw 'whatever any ...) space, beginning like
>
> (use-modules (ice-9 match))
> (define (make-exception-message key rest)
> (begin
> (let*((l (cons key rest)))
> (match l
> (('system-error subr message args data ...)
> ;; e.g. thrown with key 'system-error: ("open-fdes" "~A" ("No such file or directory") (2))
> (format #f (string-append "match-1: subr ~s threw '~s " message " sterror: ~s") subr key args (strerror (car (car data)))))
>
> (('signal any ...)
> ;; not yet implemented
> (format #f "match-2: <NYI:unix signal no> any: ~s" any))
Are you proposing to refactor (ice-9 exceptions) so that it's simpler to
follow a condition message is formed for a given exception type?
Maxim
Information forwarded
to
bug-guile <at> gnu.org
:
bug#41956
; Package
guile
.
(Sun, 28 Jun 2020 04:32:01 GMT)
Full text and
rfc822 format available.
Message #29 received at 41956 <at> debbugs.gnu.org (full text, mbox):
Hi Maxim,
>> here’s what I did in the REPL:
>>
>> scheme@(guile-user)> ,m (ice-9 exceptions)
>> scheme@(ice-9 exceptions)> (define (my/guile-system-error-converter key args)
>> (apply (case-lambda
>> ((subr msg-args msg errno . rest)
Here I changed the order: “msg-args” appears before “msg”. I don’t know
why the converter that’s currently in Guile assumes that the message
comes first.
>> scheme@(ice-9 exceptions)> (set! guile-exception-converters (acons 'system-error my/guile-system-error-converter guile-exception-converters))
guile-exception-converters is a lookup table in (ice-9 exceptions). It
associates error keys with converter procedures. Since
canonicalize-path throws a 'system-error I chose to only update the
'system-error association. I didn’t want to affect all the other
converter procedures that end up using the common converter; maybe they
should be affected — I don’t know because I don’t have any test cases
other than canonicalize-path.
> This brings embeds the definition of `guile-common-exceptions' into
> `guile-system-error-converter', with a single change:
>
> (make-exception-with-message msg) --> (apply make-exception-with-message
> msg msg-args)
>
> What is the magic I fail to see?
I cannot parse your sentence, so I’m not sure what you mean.
> Is this fix proper to be merged into the original
> guile-common-exceptions procedure?
I think we should add tests of different exceptions with different keys
to be sure that modifying the common handler doesn’t have any unexpected
side-effects.
--
Ricardo
Information forwarded
to
bug-guile <at> gnu.org
:
bug#41956
; Package
guile
.
(Sun, 28 Jun 2020 18:24:02 GMT)
Full text and
rfc822 format available.
Message #32 received at 41956 <at> debbugs.gnu.org (full text, mbox):
Hi Maxim, Ricardo,
On +2020-06-28 00:25:28 -0400, Maxim Cournoyer wrote:
> Hello Bengt,
>
> Bengt Richter <bokr <at> bokr.com> writes:
>
>
> [...]
>
> > What do you think of using (ice-9 match) to make a universal throwage-formatter,
> > with the idea of making readable top level code for how exceptions become messages on screen?
> >
> > I started a hack to explore the (throw 'whatever any ...) space, beginning like
> >
> > (use-modules (ice-9 match))
> > (define (make-exception-message key rest)
> > (begin
> > (let*((l (cons key rest)))
> > (match l
> > (('system-error subr message args data ...)
> > ;; e.g. thrown with key 'system-error: ("open-fdes" "~A" ("No such file or directory") (2))
> > (format #f (string-append "match-1: subr ~s threw '~s " message " sterror: ~s") subr key args (strerror (car (car data)))))
> >
> > (('signal any ...)
> > ;; not yet implemented
> > (format #f "match-2: <NYI:unix signal no> any: ~s" any))
>
> Are you proposing to refactor (ice-9 exceptions) so that it's simpler to
> follow a condition message is formed for a given exception type?
>
> Maxim
Well, there's probably no catching up with Ludo and Andy, judging from NEWS[1], specifically [2],
so practically speaking, no. I was just floating the idea :)
You may have noticed the "match-1" in e.g.
--8<---------------cut here---------------start------------->8---
> > (format #f (string-append "match-1: subr ~s threw '~s " message " sterror: ~s") subr key args (strerror (car (car data)))))
--8<---------------cut here---------------end--------------->8---
above. The idea there was to find easily the exact format expression that did the output,
(using the tag, to be included per some debug flag or env, but otherwise doing standard error reporting.)
A simple sequence of matches makes it easy to include such debug tags and find them in the code.
(not always easy without tags, I found :)
I guess if match is sequentially implemented like an if-elif*-else chain, it could be too slow without
a generic dispatch to different specialized match sequences, like the dispatch being used now in
--8<---------------cut here---------------start------------->8---
define (convert-guile-exception key args)
(let ((converter (assv-ref guile-exception-converters key)))
(make-exception (or (and converter (converter key args))
(default-guile-exception-converter key args))
(make-exception-with-kind-and-args key args))))
--8<---------------cut here---------------end--------------->8---
┌────────────────────────────────────────────────────────────────────────┐
│ BTW, I wonder if using a hash table and hashv-ref instead off assv-ref │
│ would make any noticeable speed difference for anyone. │
└────────────────────────────────────────────────────────────────────────┘
The commit diffs on match sequences would become a revision history for the fixes that will probably
continue to be necessary, yet the simple surface syntax would be understandable by a newbie.
Actually, looking at the code, I think I will get away while I can,
before I start seeing udev rules in the mix :)
IRL, my next hack might be a (false-if-exception-with-report sexpr) that would ouput to (current-error-port)
if an exception does occur, besides returning #f like the plain false-if-exception.
First a guaranteed (format (current-error-port) "key=<~s> args=~s\n" key args) seen by the handler, then
something more verbose and informative.
Just as a hacking tool, when I want to paper something over, but also want to know what's happening ;-)
Unfortunately, it probably won't help with syntax errors not finding closing quotes or parens and hitting eof ;/
Hope I haven't annoyed anyone.
[1] https://git.savannah.gnu.org/gitweb/?p=guile.git;a=blob_plain;f=NEWS;hb=5e1748f75128107e3a0707b66df5adb95d98437e
(I guess that's up to date, I git cloned the repo and first read the NEWS there.
LOTS going on ;-)
[2] Snip of part I wanted to indicate:
--8<---------------cut here---------------start------------->8---
** Reimplementation of exceptions
Since Guile's origins 25 years ago, `throw' and `catch' have been the
primary exception-handling primitives. However these primitives have
two problems. One is that it's hard to handle exceptions in a
structured way using `catch'. Few people remember what the
corresponding `key' and `args' are that an exception handler would see
in response to a call to `error', for example. In practice, this
results in more generic catch-all exception handling than one might
like.
The other problem is that `throw', `catch', and especially
`with-throw-handler' are quite unlike what the rest of the Scheme world
uses. R6RS and R7RS, for example, have mostly converged on
SRFI-34-style `with-exception-handler' and `raise' primitives, and
encourage the use of SRFI-35-style structured exception objects to
describe the error. Guile's R6RS layer incorporates an adapter between
`throw'/`catch' and structured exception handling, but it didn't apply
to SRFI-34/SRFI-35, and we would have to duplicate it for R7RS.
In light of these considerations, Guile has now changed to make
`with-exception-handler' and `raise-exception' its primitives for
exception handling and defined a hierarchy of R6RS-style exception types
in its core. SRFI-34/35, R6RS, and the exception-handling components of
SRFI-18 (threads) have been re-implemented in terms of this core
functionality. There is also a a compatibility layer that makes it so
that exceptions originating in `throw' can be handled by
`with-exception-hander', and vice-versa for `raise-exception' and
`catch'.
Generally speaking, users will see no difference. The one significant
difference is that users of SRFI-34 will see more exceptions flowing
through their `with-exception-handler'/`guard' forms, because whereas
before they would only see exceptions thrown by SRFI-34, now they will
see exceptions thrown by R6RS, R7RS, or indeed `throw'.
Guile's situation is transitional. Most exceptions are still signalled
via `throw'. These will probably migrate over time to
`raise-exception', while preserving compatibility of course.
See "Exceptions" in the manual, for full details on the new API.
--8<---------------cut here---------------end--------------->8---
--
Regards,
Bengt Richter
Information forwarded
to
bug-guile <at> gnu.org
:
bug#41956
; Package
guile
.
(Wed, 02 Jun 2021 14:46:03 GMT)
Full text and
rfc822 format available.
Message #35 received at 41956 <at> debbugs.gnu.org (full text, mbox):
I understand that a overhaul of the exceptions stack intervened while
this bug was open
Is this still current ?
Information forwarded
to
bug-guile <at> gnu.org
:
bug#41956
; Package
guile
.
(Fri, 10 Nov 2023 04:19:02 GMT)
Full text and
rfc822 format available.
Message #38 received at 41956 <at> debbugs.gnu.org (full text, mbox):
Hi,
Adriano Peluso <randomlooser <at> riseup.net> writes:
> I understand that a overhaul of the exceptions stack intervened while
> this bug was open
>
> Is this still current ?
Yes. The affected code hasn't been touched since 2019. To recall, the
reproducer is this:
--8<---------------cut here---------------start------------->8---
(use-modules (srfi srfi-34)
(srfi srfi-35))
(guard (c ((message-condition? c)
(format #t "error: ~a~%" (condition-message c))))
(canonicalize-path "/no/such/path"))
--8<---------------cut here---------------end--------------->8---
or this:
--8<---------------cut here---------------start------------->8---
(use-modules (srfi srfi-34)
(srfi srfi-35))
(guard (c ((message-condition? c)
(format #t "error: ~a~%" (condition-message c))))
;; This is what (canonicalize-path "/do/not/exist) ends up doing:
(throw 'system-error "canonicalize-path" "~A" '("No such file or directory")))
error: ~A
--8<---------------cut here---------------end--------------->8---
--
Thanks,
Maxim
This bug report was last modified 1 year and 304 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.