Do they test at all?

I’ve noticed that there are a lot of sites out there that have swfs throwing Errors (*).  It’s the most annoying thing about having to use the debugger version of the flash player. I don’t want to look at other coders sloppy error handling, but there seems to be no choice. Check Microsofts Xbox Live site for instance: http://live.xbox.com/nb-NO/default.aspx – it pops an error window with: Error #2044: Unhandled IOErrorEvent:. text=Error #2035: URL Not Found. The site is just a random example – Microsoft is no better or worse than others.

Come on people! Add some event listeners, test your code. Run the debugger version yourselves. An Error means that something you should have control over isn’t under control.  It’s not brain surgery – it’s two lines of code. Give or take.

* Technically the sites have code that dispatch ErrorEvents that there are no listeners for. When an ErrorEvent isn’t handled, it’s displayed in the same way a throw new Error()


5 Responses to “Do they test at all?”

  1. 1 expertbuddy
    September 24, 2009 at 11:29 am

    It keeps remaining that there needs to be a global event handling mechanism which is missing 😦 in Adobe Flash player rather than controlling the individual errors.

  2. September 24, 2009 at 2:49 pm

    Yes it’s a nightmare, but I prefer to catch my errors instead of adding listeners for them (unless needed).

    People must learn that everything that can possibly throw an error must be enclosed in this block of code:

    // your code here
    // catch you error here

    • September 25, 2009 at 7:10 am

      The problem is that you can’t try … catch errors that are the result of an asynchronous operation like eg. load(url) – and external communication is an operation that certainly can fail.

      I try to avoid try … catch – in most cases a if statement does the job, which gives me more readable code as the possible causes of errors are explicitly tested for instead of just generically caught. Another reason to be careful with try … catch is that throwing errors is time consuming. If you rely on it as code logic, things run a lot slower than necessary

  3. October 12, 2009 at 5:47 am

    Look like Adobe thinks the same as us – Flashplayer 10.1 allows for a global error event listener that handles any ErrorEvents not handled explicitly. Yay!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

September 2009
« Aug    



%d bloggers like this: