Path: csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Cecil Westerhof Newsgroups: comp.lang.java.programmer Subject: Re: How to handle same sanity checks Date: Fri, 23 Jun 2017 16:31:23 +0200 Organization: Decebal Computing Lines: 26 Message-ID: <871sqaojwk.fsf@munus.decebal.nl> References: <87o9tgo0a9.fsf@munus.decebal.nl> <87fuernwav.fsf@munus.decebal.nl> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="f007575c907e67c534b3e9f520a75a29"; logging-data="18556"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/Z619BxHyobvb9+zZZXmnVVTu0d43DfBM=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) X-Homepage: http://www.decebal.nl/ Cancel-Lock: sha1:47M/LZTMzMNF7mW5ZHAtVKtECwU= sha1:DljUkR8pfjrs/lx6u2ppOke5840= Xref: csiph.com comp.lang.java.programmer:36705 On Friday 23 Jun 2017 15:57 CEST, Eric Sosman wrote: > On 6/23/2017 12:48 AM, Cecil Westerhof wrote: >> [... creates a Throwable, then alters the stack trace ...] >> >> The code is now more clear and easier to change, while the stack >> trace gives the right information. > > It's a matter of opinion, perhaps, but I'd say the stack trace > now gives the *wrong* information. Specifically, following the > trace to find where the Throwable came from leads to a dead end, > to a place where the Throwable did not arise and could not have > arisen. > > Now, you may hold that this is a "little white lie," but I > still believe it's a lie. Perhaps it's a little lie, but how > great will your lies grow before you draw the lyin'? You have a point. I need to think about that. Maybe I could add something to the message to clear it up. Another possibility would be to make it parameter driven. -- Cecil Westerhof Senior Software Engineer LinkedIn: http://www.linkedin.com/in/cecilwesterhof