package{
import flash.display.Sprite;
publicclass Main extends Sprite{
public function Main(){
try {
trace("This code is about to throw an error.");
thrownew Error("A general error occurred.");
trace("This line won't run");
}
catch (errObject:Error) {
trace("The catch block has been called.");
trace("The message is: " + errObject.message);
}
}
}
}