我在获取错误堆栈跟踪时遇到问题。当我在调试播放器中使用 error.getStackTrace() 时,它工作正常。
ReferenceError: Error #1056: Не удается создать свойство asdad в starling.display.Stage. at app.views::MachineHeader/onSoundButtonTriggered()
[/var/lib/jenkins/jobs/.../src/app/views/MachineHeader.as:111] at starling.events::EventDispatcher/invokeEvent()
[/var/lib/jenkins/jobs/.../workspace/src/starling/events/EventDispatcher.as:141] at starling.events::EventDispatcher/dispatchEvent()
[/var/lib/jenkins/jobs/.../workspace/src/starling/events/EventDispatcher.as:112] at starling.events::EventDispatcher/dispatchEventWith()
[/var/lib/jenkins/jobs/.../workspace/src/starling/events/EventDispatcher.as:190] at org.feathers.controls::Button/button_touchHandler()
[/var/lib/jenkins/jobs/.../workspace/src/org/feathers/controls/Button.as:3052] at starling.events::EventDispatcher/invokeEvent()
[/var/lib/jenkins/jobs/.../workspace/src/starling/events/EventDispatcher.as:141] at starling.events::TouchEvent/dispatch()
[/var/lib/jenkins/jobs/.../workspace/src/starling/events/TouchEvent.as:174] at starling.events::Touch/dispatchEvent()
[/var/lib/jenkins/jobs/.../workspace/src/starling/events/Touch.as:231]
但在发布播放器 stackTrace 看起来像:
ReferenceError: Error #1056
代码:
this.loaderInfo.uncaughtErrorEvents.addEventListener(UncaughtErrorEvent.UNCAUGHT_ERROR, onGlobalErrorsHandler);
private function onGlobalErrorsHandler(e:UncaughtErrorEvent):void {
if (_errorList[e.errorID]) {
e.preventDefault();
return;
}
trace(e.error.getStackTrace());
var data:Object = {};
data["login"] = AMFService.instance.login;
data["error_type"] = String(e.error.errorID);
data["stacktrace"] = e.error.getStackTrace();
AMFService.instance.sendError("statistics.error_send", data);
_errorList[e.errorID] = e.error;
e.preventDefault();
}
调试播放器:Linux 11.2 发布播放器:PepperFlash 11.9
我做错了什么?如何在发布播放器上获取堆栈跟踪?
比你。