BIRT报告查看器-自定义错误报告 [英] BIRT report viewer - custom error reporting

查看:95
本文介绍了BIRT报告查看器-自定义错误报告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有几个报告和几个应用程序为报告提供数据.我们使用BIRT Report Viewer 2.3.2来显示报告.

We have several reports and several applications feeding the reports with data. We use BIRT Report Viewer 2.3.2 to display the reports.

问题是,当无法访问应用程序时,BIRT Report Viewer会显示一个标题为"Exception"的错误消息框,其中包含异常标头,展开堆栈跟踪的链接以及两个按钮(确定和取消).

Thing is, when an application is unreachable the BIRT Report Viewer displays an error message box titled "Exception" with the exception header, the link to expand the stack trace, and two buttons, ok and cancel.

对于这些异常,我希望收到一条友好的消息,例如正在重新加载应用程序X,请等待几分钟,然后重试.",没有堆栈跟踪,只有一个确定按钮.

For these kind of exceptions i would like a friendlier message saying something like "Application X is reloading, please wait a few minutes and try again.", with no stack trace, and only one ok button.

例外是:org.eclipse.birt.data.engine.odaconsumer.ConnectionManager openConnection严重:无法打开连接.org.eclipse.birt.report.data.oda.jdbc.JDBCException:get连接出错,URL不能为空.

The exception is: org.eclipse.birt.data.engine.odaconsumer.ConnectionManager openConnection SEVERE: Cannot open connection. org.eclipse.birt.report.data.oda.jdbc.JDBCException: There is an error in get connection, The url cannot be null.

无论如何,我都不关心发生了什么异常,我希望它记录在log4j中,并在BIRT报告查看器中显示一个友好的消息框.

In any case i do not care what the exception happens to be, i want it logged in the log4j and a friendly message box displayed on the BIRT Report Viewer.

有什么想法吗?

推荐答案

如果要自定义例外,请
转到-> \ webcontent \ birt \ pages \ dialog \ ExceptionDialogFragment.jsp ,您可以自定义自己的消息,例如
给您带来的不便,我们深表歉意.发生意外错误.请与管理员联系
通过删除该 jsp 文件中提供的堆栈跟踪.

If you want to customize the exception then
Goto -->\webcontent\birt\pages\dialog\ExceptionDialogFragment.jsp of your war file and you can customize of your own message like
Sorry for the Inconvenience. Unexpected Error Occurred. Please contact administrator
by removing the stack trace provided in that jsp file.

这篇关于BIRT报告查看器-自定义错误报告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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