Hello, this patch makes ##sys#error-handler respect the width limit as it's done in the other code paths. (Limits have been bumped to 100 to make those uniform throughout the code) I hope the merge window is still open :)
Cheers, LemonBoy
From 8bde15710369107adae9b89b9ba0dca89bdf3956 Mon Sep 17 00:00:00 2001 From: LemonBoy <thatle...@gmail.com> Date: Wed, 25 May 2016 21:35:11 +0200 Subject: [PATCH] Truncate overlong lines in ##sys#error-handler To: chicken-hackers@nongnu.org --- library.scm | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/library.scm b/library.scm index a32ee8c..9e3c577 100644 --- a/library.scm +++ b/library.scm @@ -3898,15 +3898,18 @@ EOF (when msg (##sys#print ": " #f ##sys#standard-error) (##sys#print msg #f ##sys#standard-error) ) - (cond [(fx= 1 (length args)) - (##sys#print ": " #f ##sys#standard-error) - (##sys#print (##sys#slot args 0) #t ##sys#standard-error) ] - [else - (##sys#for-each - (lambda (x) - (##sys#print #\newline #f ##sys#standard-error) - (##sys#print x #t ##sys#standard-error) ) - args) ] ) + (##sys#with-print-length-limit + 100 + (lambda () + (cond [(fx= 1 (length args)) + (##sys#print ": " #f ##sys#standard-error) + (##sys#print (##sys#slot args 0) #t ##sys#standard-error)] + [else + (##sys#for-each + (lambda (x) + (##sys#print #\newline #f ##sys#standard-error) + (##sys#print x #t ##sys#standard-error)) + args)]))) (##sys#print #\newline #f ##sys#standard-error) (print-call-chain ##sys#standard-error) (when (and ##sys#break-on-error (##sys#symbol-has-toplevel-binding? 'repl)) @@ -3988,7 +3991,7 @@ EOF '(user-interrupt) '() ) ) ] [(#:warning #:notice) - (##sys#print + (##sys#print (if (eq? mode #:warning) "\nWarning: " "\nNote: ") #f ##sys#standard-error) (##sys#print msg #f ##sys#standard-error) @@ -3997,10 +4000,13 @@ EOF (##sys#print ": " #f ##sys#standard-error)) (for-each (lambda (x) - (##sys#print x #t ##sys#standard-error) - (##sys#write-char-0 #\newline ##sys#standard-error) ) - args) - (##sys#flush-output ##sys#standard-error) ] + (##sys#with-print-length-limit + 100 + (lambda () + (##sys#print x #t ##sys#standard-error) + (##sys#write-char-0 #\newline ##sys#standard-error)))) + args) + (##sys#flush-output ##sys#standard-error)] [else (when (and (symbol? msg) (null? args)) (set! msg (##sys#symbol->string msg)) ) -- 2.8.3
_______________________________________________ Chicken-hackers mailing list Chicken-hackers@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-hackers