从 Flex 前端的 Java (Apache Tomcat) 后端获取堆栈跟踪(由 BlazeDS 连接) [英] Get stacktrace from Java (Apache Tomcat) backend on Flex frontend (connected by BlazeDS)

查看:24
本文介绍了从 Flex 前端的 Java (Apache Tomcat) 后端获取堆栈跟踪(由 BlazeDS 连接)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 BlazeDS 将我的 Flex 前端连接到我的 Java 后端,并且想知道是否有任何方法可以获得完整的堆栈跟踪,以防异常传递到前端.当我在 Flex 中的异常处理程序中设置断点时,我只看到一条基本消息、故障字符串等.

I'm using BlazeDS to connect my Flex front end to my Java backend, and was wondering if there is any way I can get the complete stack trace in case of an exception to be passed to the front end. When I set a break point in the exception handler in Flex, I just see a basic message, fault string etc.

非常感谢您的帮助.

谢谢!

推荐答案

您可以创建自定义异常;然后在最高级别捕获所有服务器端异常,并使用原始异常的堆栈跟踪作为属性重新抛出您的自定义异常.您应该可以访问此客户端.

You could create a custom exception; then catch all serverside exceptions at highest level and rethrow your custom exception with the stacktrace of the original exception as a property. You should be able to access this clientside.

此外,如果您在服务器端使用 Spring,Spring BlazeDS 集成可以使用 异常翻译器.

Also, if you're using Spring on the server side, the Spring BlazeDS integration can translate server-side exceptions into cleaner client-side ones using exception translators.

这篇关于从 Flex 前端的 Java (Apache Tomcat) 后端获取堆栈跟踪(由 BlazeDS 连接)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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