Path: csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Martin Gregorie Newsgroups: comp.lang.java.programmer Subject: Re: How to handle same sanity checks Date: Mon, 26 Jun 2017 15:22:46 -0000 (UTC) Organization: A noiseless patient Spider Lines: 33 Message-ID: References: <87o9tgo0a9.fsf@munus.decebal.nl> <87fuernwav.fsf@munus.decebal.nl> <871sqaojwk.fsf@munus.decebal.nl> <527ac443-c67d-427f-a024-a09e70f4ede2@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Mon, 26 Jun 2017 15:22:46 -0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="bd9c564d5e0e09d99abbff91f4050575"; logging-data="18957"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18apzDdDcpi5FTn7V/aRsESt19upZNxQz8=" User-Agent: Pan/0.141 (Tarzan's Death; 168b179 git.gnome.org/pan2) Cancel-Lock: sha1:C5GPZkESonLsvfhqTATtK/ukYfs= Xref: csiph.com comp.lang.java.programmer:36732 On Mon, 26 Jun 2017 13:34:40 +0000, Martin Gregorie wrote: > On Mon, 26 Jun 2017 05:21:33 -0700, Eric Douglas wrote: > >> Sometimes it's helpful or even necessary to see the entire stack trace >> for an error. Sometimes that's harmful clutter if you can get multiple >> errors around the same time. >> > Obviously we use different approaches to debugging. > > I find the execution path leading to the error to be considerably more > useful than a stackdump, which is why I developed my ReportError class. > Its use makes it possible to leave diagnostic messages in a live program > and to control the amount of trace detail shown, if any, at run time. > The impact on performance with tracing off is very small. Benchmark: The best automatic tracing system I've seen ever was in the 1977 vintage Algol68R runtime package Apart from the correctly formatted contents of all variables and parameters at this stack level, it gave you the execution path through the procedure's code. It showed "if..then", "if..else", "do nn times", etc ... using line numbers to identify the conditionals, loop delimiters, etc. I've seen COBOL runtimes do the almost same job as the Algol 68R one nearly as well too. -- martin@ | Martin Gregorie gregorie. | Essex, UK org |