在Blackberry Java中捕捉Throwable:好主意吗? [英] Catching Throwable in Blackberry Java: Good Idea?

查看:97
本文介绍了在Blackberry Java中捕捉Throwable:好主意吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我经常在Blackberry文档中看到Throwable的catch子句,例如

I often see catch clauses for Throwable in Blackberry documentation, such as the Network API docs. My sense is that this is not generally a good practice in Java.

在Blackberry编程中是否有这个原因?

Is there a reason for this in Blackberry programming?

是否与堆栈跟踪生成适用于Throwables?

Does it have to do with stack trace generation for Throwables?

推荐答案

当您在BlackBerry应用程序中捕获Throwable时,它不仅保留堆栈跟踪,还将堆栈跟踪保存在设备事件日志中.

When you catch Throwable in a BlackBerry app, not only does it preserve the stack trace, it saves that stack trace in the device event log. There is no way for an app to get a stack trace itself, so unfortunately you can't automatically collect stack traces.

要查看堆栈跟踪,请拉起事件日志查看器.对于带有物理键盘的黑莓手机,请按住"Alt",然后按L G L G调出事件日志.

To view the stack trace, you pull up the event log viewer. For blackberries with physical keyboards, hold 'Alt' and then press L G L G to bring up the event log.

这篇关于在Blackberry Java中捕捉Throwable:好主意吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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