查找所有例外事件 [英] Find all Exceptions Occurrences

查看:106
本文介绍了查找所有例外事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近我遇到了一种情况,我必须跟踪与我的应用程序中发生的特定异常相关的崩溃(不是指定的类和公共应用程序)是混淆的,所以我没有行号或可读的堆栈跟踪)。

Recently i have faced a situation that i had to trace a crash related to specific exception that occurred in my app (not a specified class, and the public app is obfuscated so i dont have line numbers or readable stack trace).

我发现自己用鼠标悬停在各种框架方法调用上,只是为了看看他们可能会抛出哪些异常,所以我能找到错误的原因。

I found myself hovering with my mouse over various framework method calls, just to see which Exceptions they may throw so i could find the cause of the bug.

是否有一种自动方式可以搜索我的所有代码以查找可能引发特定异常的调用? (自动化我手动完成的工作)

Is there an automated way to search all of my code for calls that may throw specific Exceptions? (automating what i did manually)

谢谢

推荐答案

不,

作为一般指南。所有可能在您自己的应用程序之外发生的事情都需要例外,您不能提前进行测试。 

As a general guide. Exceptions are needed on everything which can happen from outside your own app and you cannot simply test in advance. 

有些人会进行例如算术运算,这完全是胡说八道,那些抛出没有例外,如果邮件错误,他们就会停止。 

Some do it around for instance arithmetic operations, that is complete nonsense, those throw no exceptions they just stop if it is wrong with a message. 


这篇关于查找所有例外事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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