package{ import flash.display.Sprite; public class Main extends Sprite{ public function Main(){ var sUsername:String = ""; var erToThrow:Error; try { if(sUsername == "") { throw new EmptyStringException(); } if(sUsername == undefined) { throw new UndefinedException(); } } catch (erObject:EmptyStringException) { // Code to handle error. } catch (erObject:UndefinedException) { // Code to handle error. } } }}
Name (required)
email (will not be published) (required)
Website