views:

58

answers:

0

Hi,

this question is about how to create useful log information in a .swf that should be send to a serversided log.

I have read http://stackoverflow.com/questions/101532/how-to-catch-all-exceptions-in-flex and was very happy about the new UncaughtErrorEvent.

But it is not as useful I thought first: You can not get a stack-trace out of the event or even out of a newly created Error unless you are using the debugging version of the flash player.

So what should I do best if I want to send failure-logs back to my server, when sth. goes wrong in the .swf? Should I introduce Error-Code-Markers to identify the piece of code that is failing? Sure that is no real substitue for a stacktrace, also not because not every Error automatically gets them - I could only benfit from them in the places where I set them manually and the Error or log is created by my own code.

Are there any good ideas how to log an erratic piece of code ... or is it possible to get a stack trace out of a thrown error after all?

thanks, JH