未捕获的异常处理程序中未捕获异常 [英] Uncaught exception within uncaught exception handler

查看:186
本文介绍了未捕获的异常处理程序中未捕获异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这个问题可能听起来有点愚蠢;)

This question may sound a little silly ;)

如何处理 UncaughtExceptionHandler

推荐答案

嗯,你必须自己抓住他们。

Well, you have to catch them yourself. The documentation of uncaughtException() linked by you states this clearly:


任何异常这个方法抛出的将被Java虚拟机忽略。

Any exception thrown by this method will be ignored by the Java Virtual Machine.

但是你只能计划到目前为止。那么你处理异常处理程序的异常,但处理那个代码的呢?记录失败的日志记录事件是一样的。异常处理程序一直下来...

But you can only plan so far. So you handle the exceptions of your exception handler but who handles that code? It's the same with logging a failed logging event. Exception handlers all the way down...

这篇关于未捕获的异常处理程序中未捕获异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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