Hi,
not really, but you can do it partially yourself.
If you look in xflas2, you'll find a call Logger.markEntry(arguments)

If you call ClassB.methodB with params 1,2,3 from ClassA.methodA and methodB
looks like:
public methodB (a:Number, b:Number, c:Number) {
 Logger.markEntry(arguments);
}

and ClassA.methodA like
private function methodA() {
myClassBInstance.methodA(2,5,7);
}

it will print something like:
ClassB.methodB called from ClassA.methodA with arguments 2,5,7

So that kind of saves you some of the working, and it includes info
dynically.
Download at osflash.org/xflas2 contains examples as well.

greetz.
JC




On 2/5/07, Jason Boyd <[EMAIL PROTECTED]> wrote:

I think I know the answer, but...

Is there any way to get a stack trace programmatically? I've got a
simple assert function, which terminates script execution on fail, and
it would be sooo helpful to be able to print a stack trace, instead of
having to *tell* the assert function where it is being called from
every time I use it.

A related question: why not? Clearly this info exists at runtime. The
debugger displays it, for instance.

For that matter, I find it rather annoying that you can get a
reference to the calling function via the arguments property, but you
still can't identify which function this is. Am I missing anything
there?

Oh and I'm using AS 2.0 for now. I'm curious about what 3.0 offers for
better error/exception handling, but am not ready to go that route
yet. I suppose I ought to set up ASUnit, but that looks like it might
eat up some time.
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to