chicken-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-hackers] [PATCH] Truncate overlong lines in ##sys#error-han


From: felix . winkelmann
Subject: Re: [Chicken-hackers] [PATCH] Truncate overlong lines in ##sys#error-handler
Date: Sun, 29 May 2016 17:36:09 +0200

> On Wed, May 25, 2016 at 09:41:52PM +0200, lemonboy wrote:
> > 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 :)
>
> I tested, and indeed right now, (error (circular-list 1 2 3 4))
> will print endlessly.  That really sucks, and I suppose if you
> pass in extremely large objects that will also be annoying.
>
> On the other hand, a limit of 100 characters is very strict.  I'm
> thinking of situations like RDBMS error messages, where it will
> print the query context where the error occurred.  There will be
> other situations where the exact object matters, even though it
> may be large.
>
> Truncating at 100 characters would be obnoxious, especially in
> situations where you're trying to debug extremely rare errors
> from error log files.  If the error is rare enough, it would
> be very frustrating to have it be truncated.
>
> On the other hand, you don't want hundreds of megabytes of XML
> document data to end up in your log files either, for example...
>
> What do the other core hackers think?

A fixed limit is fine. There is no need to cover every possible situation, and
user code (exception handler) may take care of special cases like your example.
Any other solution will just introduce complexity that is never used.


felix




reply via email to

[Prev in Thread] Current Thread [Next in Thread]