使用 Flex 获取完整异常错误 [英] Get Full Exception Error with Flex

查看:25
本文介绍了使用 Flex 获取完整异常错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法使用跟踪,因为我没有使用 Adob​​e IDE,当我尝试查看异常错误时,似乎无法获得完整的错误消息,我似乎只能获得errorID".例如,如果我有一个 1069 错误,我应该看到类似:

I can't use trace because I'm not using an Adobe IDE and when I try to view my exception errors, I can't seem to get the full error message, I only seem to get the "errorID". For example, if I had a 1069 error, I should see something like:

错误 #1069:在 X 上找不到属性数据和没有默认值.

Error #1069: Property data not found on X and there is no default value.

但我看到的是这个......

But instead I see this...

参考错误:错误 #1069

ReferenceError: Error #1069

这是我的代码...

try
{
//error gets thrown here
}
catch(e:Error)
{
extTrace('Error: '+e.toString());//I also tried e.message, e.name & ObjectUtil.toString(e.getStackTrace())
}

这只是一个简化日志记录到控制台的功能.由于console.log(''),我不确定这是否是问题的原因,但无论如何...

This is just a function for simplifying logging to console. I'm not sure if it's the reason for the issue or not, due to console.log(''), but whatever...

private function extTrace(traceString:String):void
{
ExternalInterface.call("console.log('"+traceString+"')");
}

我也尝试过 e.message、e.name &ObjectUtil.toString(e.getStackTrace())

I also tried e.message, e.name & ObjectUtil.toString(e.getStackTrace())

推荐答案

要获得完整的错误信息,您需要在调试模式下进行测试;看起来您正在发布中运行,这删除了很多调试符号

To get the full error message, you need to test in debug mode; it looks like you're running in release, which removes a lot of debug symbols

这篇关于使用 Flex 获取完整异常错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆