瑞文文摘

【delphi】intraweb自定义错误页面



标签:delphi

intraweb自定义错误页面
当IntraWeb程序发生错误时,会跳出系统默认的页面,使我们的程序看起来不是那么专业了。下面是摘自网络的文章:
How to customize the error screen in Intraweb
In order to have Intraweb display your error page instead of the default one, you must take the following steps:
Create a file named IWError.html
Fill it with something like this:

Da error is in da house



Beware the mighty error!!!




Place IWError.html in the application Templates folder.
Use the following placeholders inside, wherever you want them:

{%ATOZEDLOGO%} to display the Atozed logo
{%INTRAWEBLOGO%} to display the Intraweb logo
{%CONTENT%} to display the exception message
{%APPADDRESS%} to display the application address
{%EXCEPTIONSPECIFIC%} to display an exception specific explanation (only a few are defined)
{%APPNAME%} to display the application name

Do not use single quotes
The file IWError.html is output via Javascript. Make sure you don't have single quotes in it, or else you'll end in a Javascript error.
------------------------------------------------------------------------------------------------
怎样定制intraweb的错误页面。
为了使intraweb显示你的错误页面,而不是默认的,你必须安照下面几个步骤:
创建一个命名为 IWError.html 的文件
在里面写入如下代码:

Da error is in da house



Beware the mighty error!!!




把IWError.html放到工程的 Templates 文件夹中.
你可以在任何地方使用下面的占位符({%%})中的文字(使用时要包括{%%})
{%ATOZEDLOGO%} 显示Atozed的标志logo
{%INTRAWEBLOGO%} 显示Intraweb的标志logo
{%CONTENT%} 显示例外消息
{%APPADDRESS%} 显示应用程序地址(url地址)
{%EXCEPTIONSPECIFIC%} 显示例外的详细说明(只有一些被定义)
{%APPNAME%} 显示应用程序的名称
在文件中不要使用单引号
IWError.html文件是通过Javascript输出的。请务必确认你的文件中没有单引号,否则你的页面会在一个Javascript错误中终止(无法输出)。

上一篇:【人教版二年级上册数学教案及反思】2.6连加连减

下一篇:【人教版二年级上册数学教案及反思】2.7加、减混合



瑞文软件工作室 版权所有 [冀ICP备17033643号]
[联系我们][访问电脑版]