This page is no longer maintained — Please continue to the home page at www.scala-lang.org

filling in stack traces

3 replies
extempore
Joined: 2008-12-17,
User offline. Last seen 35 weeks 3 days ago.

What do you think about ControlException overriding fillInStackTrace()
like most of its users already do and all probably (?) should?

Erik Engbrecht
Joined: 2008-12-19,
User offline. Last seen 3 years 18 weeks ago.
Re: filling in stack traces
+1

But unless there's some need to make it final, I'd like something that I can override to put stack traces back in temporarily for debugging purposes.

On Wed, Jul 15, 2009 at 9:29 AM, Paul Phillips <paulp@improving.org> wrote:
What do you think about ControlException overriding fillInStackTrace()
like most of its users already do and all probably (?) should?

--
Paul Phillips      | One way is to make it so simple that there are
Stickler           | obviously no deficiencies. And the other way is to make
Empiricist         | it so complicated that there are no obvious deficiencies.
pp: i haul pills   |     -- Hoare



--
http://erikengbrecht.blogspot.com/
DRMacIver
Joined: 2008-09-02,
User offline. Last seen 42 years 45 weeks ago.
Re: filling in stack traces

2009/7/15 Paul Phillips :
> What do you think about ControlException overriding fillInStackTrace()
> like most of its users already do and all probably (?) should?

One option which I favour is to have something like the following:

object ControlException{
var debugStackTraces = System.getProperty("some.property");
}

trait ControlException extends Throwable{
override def fillInStackTraces =
if(ControlException.debugStackTraces) super.fillInStackTrace else
this;
}

milessabin
Joined: 2008-08-11,
User offline. Last seen 33 weeks 3 days ago.
Re: filling in stack traces

On Wed, Jul 15, 2009 at 2:29 PM, Paul Phillips wrote:
> What do you think about ControlException overriding fillInStackTrace()
> like most of its users already do and all probably (?) should?

Yes, that sounds quite plausible.

Cheers,

Miles

Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland