try {//有可能出错的代码
throw new Error("A general error occurred.");//抛出错误
trace("This line won't run");
}
catch (errObject:Error) {//捕捉错误
trace("The message is: " + errObject.message);//错误信息
}
try {//有可能出错的代码
throw new Error("A general error occurred.");//抛出错误
trace("This line won't run");
}
catch (errObject:Error) {//捕捉错误
trace("The message is: " + errObject.message);//错误信息
}