GNU bug report logs -
#29684
exception printers - request for improvement
Previous Next
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Hello,
The attached patched is from Daniel Lloren, I'm just 'a messenger' (and added
a comment in the source, preceding the new binding).
The proposed patch is to allow exception printers user customization.
This has been very important, not to say vital, for those of us who manipulate large
structures, lists, arrays, sfri-4 bytevectors, ..., something we have been doing
locally ... but we need something for our users (aiscm, guile-cv ...), so they don't
have to patch guile locally... (most would be scared to do so and would not do it
anyway...).
Once applied, users can, for example, customize the raised exception system so it
uses truncated-print, either individually (in .guile), or guile admins can do
this globally (in share/guile-site/init.scm):
(use-modules (ice-9 pretty-print))
(when (defined? 'exception-format)
(set! exception-format
(lambda (port fmt . args)
(for-each (lambda (arg)
(truncated-print arg #:port port))
args))))
Maybe there is another/better approach, I don't know, but this works pretty well
for me...
Thanks,
David
[0002-Allowing-exception-printers-user-customization.patch (text/x-patch, attachment)]
[Message part 3 (application/pgp-signature, inline)]
This bug report was last modified 6 years and 363 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.