A Flash Developer Resource Site

Results 1 to 8 of 8

Thread: Catching / logging all errors - possible? How?

  1. #1
    Junior Member
    Join Date
    Aug 2009
    Posts
    7

    Catching / logging all errors - possible? How?

    Hey guys,

    Is it possible to log any and all errors in Flash? The debug player definitely has access to the information when a bug is encounted, is there a way to get that info and send it off in the background?

    Ben

  2. #2
    Will moderate for beer
    Join Date
    Apr 2007
    Location
    Austin, TX
    Posts
    6,801
    You could try wrapping your main loop function (if any) with a try/catch block which catches any sort of error.

  3. #3
    Junior Member
    Join Date
    Aug 2009
    Posts
    7
    Yeah I'm really looking for something beyond just try/catchs, a way to intercept any error event across the whole movie so it can be logged rather than catching for the sake of recovering and proceeding.

  4. #4
    Will moderate for beer
    Join Date
    Apr 2007
    Location
    Austin, TX
    Posts
    6,801
    If you have a main loop you can surround with a try/catch, you can log the stuff that is caught. You don't have to recover from it, you could re-throw it.

    Otherwise, no, I'm not aware of any global error logging framework that would not involve messing with the player itself.

  5. #5
    half as fun, double the price senocular's Avatar
    Join Date
    Feb 2002
    Location
    San Francisco, CA (USA)
    Posts
    4,361

  6. #6
    Junior Member
    Join Date
    Aug 2009
    Posts
    7
    Bugger. Ok thanks guys.

  7. #7
    half as fun, double the price senocular's Avatar
    Join Date
    Feb 2002
    Location
    San Francisco, CA (USA)
    Posts
    4,361
    That bug, btw, is for handling errors via AS only. If you're strictly interested in logging the errors, you can use ErrorReportingEnable=1
    http://livedocs.adobe.com/flex/3/html/logging_04.html

  8. #8
    Junior Member
    Join Date
    Aug 2009
    Posts
    7
    Nah I was looking for a more global solution I could drop into my analytics system for games so we can just sit back and watch players hitting errors all over the net, something that would have enabled us to automatically send error reports to the system from any game with the dev having to go to little or no effort. Oh well.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center