简体   繁体   English

捕获/检测程序中的所有运行时错误

[英]Capture/detect all runtime error in the program

In an Android application, whenever a runtime error occurs, is it possible to get its stack trace information and send this information to somewhere on the Internet? 在Android应用程序中,每当发生运行时错误时,是否有可能获取其堆栈跟踪信息并将此信息发送到Internet上的某个位置? (by using code in that Android application or other methods) (通过在该Android应用程序中使用代码或其他方法)

I know this question looks a little weird because that Android application may already crashes when a runtime error occurs. 我知道这个问题看起来有些奇怪,因为发生运行时错误时,Android应用程序可能已经崩溃。 But I still want to know whether this is possible. 但是我仍然想知道这是否可能。

Thanks, 谢谢,

In an Android application, whenever a runtime error occurs, is it possible to get its stack trace information and send this information to somewhere on the Internet? 在Android应用程序中,每当发生运行时错误时,是否有可能获取其堆栈跟踪信息并将此信息发送到Internet上的某个位置?

Yes. 是。 ACRA is perhaps the most popular example of this. ACRA也许是最受欢迎的例子。

Yes this possible and also in couple of ways. 是的,这是可能的,并且还有几种方式。 1) when ever an runtime error you can gather required error log and open mail application and send it to the desired person. 1)每当运行时错误时,您都可以收集所需的错误日志并打开邮件应用程序,然后将其发送给所需的人员。 2) if you have any webservice then you can send the error log to desired place. 2)如果您有任何Web服务,则可以将错误日志发送到所需位置。

We have create a class which implements the UncaughtExceptionHandler and do it... 我们创建了一个实现UncaughtExceptionHandler的类并执行此操作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM