Reputation: 567
in order to create a logfile if anything goes wrong during execution of my AIR app, I added a global exception handler like this:
private function onUncaughtError(e:UncaughtErrorEvent):void
{
e.preventDefault();
var error:Error = e.error;
Logger.log("Uncaught Error:" + " - Message: " + error.message, "session");
}
what this gives me in the logfile is something like this:
Uncaught Error - Message: Error #3003: File or directory does not exist.
Is there any way I can log a bit more of information? like for example what object the error has thrown?
Upvotes: 2
Views: 1385
Reputation: 61
Error.getStackTrace()
will only give at the time of debugging or when you are running your app using flash builder.
If you have made installer of .exe
of your air app than it won't work with Error.getStackTrace()
.
Upvotes: 1