GNU bug report logs -
#41956
[PATCH] ice-9: exceptions: Properly format the error message.
Previous Next
Full log
View this message in rfc822 format
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
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.