Salesforce

DefError File Structure (Magic xpa 2.x)

« Go Back

Information

 
Created ByKnowledge Migration User
Approval Process StatusPublished
Objective
Description

DefError File Structure (Magic xpa 2.x)

Dynamic HTML

The example given below is a sample default HTML page that uses automatically updated HTML input elements with the request details. This is done by giving the HTML input elements pre-defined names as shown in the form below.

<HTML>

<HEAD><TITLE>Magic Application error</TITLE></HEAD>

<BODY bgcolor=navy><BR><BR><CENTER>

<TABLE bgColor=white border=3>

<TR>

<TD width=200><B>Messaging Server</B></TD>

<TD width=250><INPUT type="text" name="MG_Server" readonly style="border: medium none"> </TD>

</TR>

<TR>

<TD width=200><B>Application</B></TD>

<TD width=250><INPUT type="text" name="MG_Application" readonly style="border: medium none"> </TD>

</TR>

<TR>

<TD width=200><B>Program</B></TD>

<TD width=250><INPUT type="text" name="MG_Program" readonly style="border: medium none"></TD>

</TR>

<TR>

<TD width=200><B>Error Code</B></TD>

<TD width=250><INPUT type="text" name="MG_ErrorCode" readonly style="border: medium none"> </TD>

</TR>

<TR>

<TD width=200><B>Error Text</B></TD>

<TD width=250><INPUT type="text" size=50 name="MG_ErrorText" readonly style="border: medium none"> </TD>

</TR>

<TR>

<TD width=200><B>Arguments</B></TD>

<TD width=250><INPUT type="text" size=50 name="MG_Args" readonly style="border: medium none"> </TD>

</TR>

<TR>

<TD width=200><B>User</B></TD>

<TD width=250><INPUT type="text" name="MG_User" readonly style="border: medium none"> </TD>

</TR>

</CENTER></BODY></HTML>

Note:

In Rich Client tasks, only static HTML pages are allowed – the Web requester does not merge these tags.

XML

When using the DefError keyword, the Web requester will merge details to the specified file based on the following tags, which can appear partially or completely, in any order, in the given document:

  • <!$MG_Server> : Host/Port (sent within the request)

  • <!$MG_Application> : Application name (sent within the request)

  • <!$MG_Program> : Program name (sent within the request)

  • <!$MG_Args> : Arguments (sent within the request)

  • <!$MG_User > : User name (sent within the request)

  • <!$MG_ErrorCode> : Error code (sent from the runtime engine)

  • <!$MG_ErrorText> : Error description (sent from the runtime engine)

When the 'XML' constant is used as the value of this keyword (DefError=XML), then a simple XML with these values will be generated. You can use this option when you do not need to set additional information in the XML file. The following XML document will be created:

<xmlerr>

<errcode> <!$MG_ErrorCode> </errcode>

<errmsg> <!$MG_ErrorText> </errmsg>

<server> <!$MG_Server> </server>

<appname><!$MG_Application> </appname>

<prgname> <!$MG_Program </prgname>

<arguments> <!$MG_Args> </arguments>

<usename> <!$MG_User ></username>

</xmlerr>

Reference
Attachment 
Attachment