Closed GoogleCodeExporter closed 8 years ago
public function listenGlobalErrors(loaderinfo:LoaderInfo):void {
try{
var uncaughtErrorEvents:IEventDispatcher = loaderinfo["uncaughtErrorEvents"];
if(uncaughtErrorEvents){
uncaughtErrorEvents.addEventListener("uncaughtError", uncaughtErrorHandle);
}
}catch(err:Error){
// seems uncaughtErrorEvents is not avaviable on this player, which is fine.
}
}
private function uncaughtErrorHandle(e:Event):void{
var error:Object = e["error"]
if (error is Error){
C.error(Error(error).message);
}else if (error is ErrorEvent){
C.error(ErrorEvent(error).text);
}else{
C.error(error.toString());
}
}
Original comment by luay...@gmail.com
on 1 Jul 2010 at 11:27
Original comment by luay...@gmail.com
on 10 Jul 2010 at 3:38
Original issue reported on code.google.com by
luay...@gmail.com
on 16 Apr 2010 at 5:20