Custom Web Publishing Guide

Table Of Contents
Appendix B
Error codes for Custom Web Publishing
The Web Publishing Engine supports three types of error codes that can occur for Custom Web Publishing:
1 Database and query string errors: The Web Publishing Engine generates an error code for a published
database whenever an XML data request occurs. For information, see the next section,
“Error code numbers
for FileMaker databases.”
1 Web Publishing Engine errors: When the Web Publishing Engine is in Development mode, it generates
a specific error page when an error occurs in the Web Publishing Engine itself. When in Production mode,
a general text message is displayed. See
“Error code numbers for the Web Publishing Engine” on page 95.
1 FileMaker XSLT extension function errors: You can use the fmxslt:check_error_status() extension
function within an XSLT stylesheet to check the error status of extension functions when they are called.
See
“Error code numbers for the FileMaker XSLT extension functions” on page 97.
Error code numbers for FileMaker databases
The Web Publishing Engine generates an error code for databases published in XML format whenever data is
requested. This type of error code value is inserted at the beginning of the XML document in the
<error code>
element for the fmresultset grammar, or in the
<ERRORCODE> element for the FMPXMLRESULT or
FMPDSORESULT grammars. An error code of 0 indicates that no error has occurred.
Here is an example of the database error code in the fmresultset grammar:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE fmresultset PUBLIC "-//FMI//DTD fmresultset//EN" "/fmi/xml/fmresultset.dtd">
<fmresultset xmlns="http://www.filemaker.com/xml/fmresultset" version="1.0">
<error code="0"></error>
Here is an example of the database error code in the FMPXMLRESULT grammar:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE FMPXMLRESULT PUBLIC "-//FMI//DTD FMPXMLRESULT//EN" "/fmi/xml/FMPXMLRESULT.dtd">
<fmpxmlresult xmlns="http://www.filemaker.com/fmpxmlresult">
<ERRORCODE>0</ERRORCODE>
It is up to you, as the developer of the Custom Web Publishing solution, to check the value of the <error code>
or
<ERRORCODE> element and handle it appropriately. The Web Publishing Engine does not handle database
errors.
Error Number Description
-1 Unknown error
0 No error
1 User canceled action
2 Memory error
3 Command is unavailable (for example, wrong operating system, wrong mode, etc.)
4 Command is unknown
5 Command is invalid (for example, a Set Field script step does not have a calculation specified)