Gaurav Jassal
<?php Ideas are my bread n butter. I mold and shape them into living breathing interactive experiences and captivate. I believe that great interactive ideas drive on the tension between design and code. ?>
Info
(contact)

+44.7518.599.587
hello[at]gauravjassal[dot]com

<Catch Errors in ActionScript 3.0/>

Errors

One thing you may notice about ActionScript 3 how error prone it is or, rather, how error prone it perceives you to be. You’ll see a lot more errors, not only during compile, but also runtime. ActionScript 3 is much less lenient in letting you get away with mistakes or code conflicts. Whereas ActionScript 1 and 2 may silently fail or ignore many errors, ActionScript 3 will be sure to let you know something went wrong.

Synchronous Errors

Normal errors in code which occur as a code block is being executed are synchronous errors. When the Flash player encounters one of these errors in code, an error, or exception, is thrown. At that point the Flash player will suspend all code in the current block and prevent it from continuing unless the exception is taken care of or caught. To catch exceptions in ActionScript, you use a try..catch..finally statement.

The try..catch..finally statement lets you try a block of code possible of throwing an error and react accordingly if an error occurs. It consists of 2 or more blocks of code: an initial try block, consisting of the code that could throw an error, 1 or more catch blocks that catch errors of different types and run if that type of error is thrown, and an optional finally block which is run after the try and any catches whether or not an error occurs. Its format is as follows:

<read complete article/>
Page 1 of 1 pages

Wise Words

"If we know who we are, we will not try to become someone else in order to have value and meaning in our lives. If we don't know who we are, we will try to become someone who someone else wants us to be."

- Robert McGee

Social Things

Where you can fine me !!

View Gaurav Jassal's profile on LinkedIn

View Gaurav Jassal's profile on LinkedIn View Gaurav Jassal's profile on Delicious View Gaurav Jassal's profile on Digg View Gaurav Jassal's profile on Facebook View Gaurav Jassal's profile on feedburner View Gaurav Jassal's profile on flickr View Gaurav Jassal's profile on lastfm View Gaurav Jassal's profile on netvibes View Gaurav Jassal's profile on twitter RSS

Search Box


Advanced Search