本文介绍了Log.e不打印UnknownHostException的堆栈跟踪的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在e
是UnknownHostException
的情况下调用Log.e(TAG, "some message", e)
时,不会在logcat上打印堆栈跟踪.
Calling Log.e(TAG, "some message", e)
where e
is an UnknownHostException
, does not print the stack trace on the logcat.
推荐答案
自2011年5月20日以来,Log
类发生了变化,因此不会显示UnknownHostException
异常.
Since May 20, 2011, there is a change in the Log
class, such that UnknownHostException
exceptions are not printed.
这篇关于Log.e不打印UnknownHostException的堆栈跟踪的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!