Struts“org.apache.struts.action.RequestProcessor - 抛出未处理的异常” - 如何获得完整的堆栈跟踪?

发布于 2024-12-26 23:37:19 字数 276 浏览 3 评论 0 原文

有时,在开发过程中我得到:

[http-8080-6] WARN  org.apache.struts.action.RequestProcessor - Unhandled Exception thrown:"...

from struts.

当它重现时,我正在调试它并找到问题,但是,如果我无法重现,我将永远不知道我的应用程序中隐藏了哪些错误。

有没有办法告诉struts以调试模式或其他模式运行,以便它始终显示异常的完整堆栈跟踪?

Sometimes, during development I get:

[http-8080-6] WARN  org.apache.struts.action.RequestProcessor - Unhandled Exception thrown:"...

from struts.

When it reproduces, I'm debugging it and find the problem, however, If I cannot reproduce, I will never know which bugs are hiding in my application.

Is there any way to tell struts to run in debug mode or something, so that it will always show the full stack trace for the exception?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

梦里°也失望 2025-01-02 23:37:19

最好的选择是配置一个全局异常处理程序。如果您需要完全不同的处理,请实现ExceptionCatcherExceptionHandler。在 S1.2 中,情况类似,但您需要在自定义 processException rel="nofollow">请求处理器

(最好指出您正在使用的版本 - S1.2 和 S1.3 请求处理器是不同的。)

Your best bet is to configure a global exception handler. If you need substantially different handling, implement an ExceptionCatcher or ExceptionHandler. In S1.2 it's similar, but you'd override processException in a custom request processor.

(It's always best to indicate what version you're using--S1.2 and S1.3 request processors are different.)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文