[TOC] [Prev] [Next] [Bottom]



<@ERROR>

Syntax

<@ERROR PART=part [ENCODING=encoding]>

Description

Returns the value of the named error component specified in the PART attribute of the current error. This meta tag is valid only in an action's Error HTML or in an error.htx file and is generally used within an <@ERRORS></@ERRORS> block.

For more information, see "defaultErrorFile".

The error.htx file contains the default HTML to be returned when no Error HTML has been specified for an action or when the error occurs before action execution. Its location is specified by the defaultErrorFile configuration variable.

Tango may return more than one error at a time, so this meta tag should be used inside an <@ERRORS></@ERRORS> block to ensure that the information for all errors generated is shown.


!Note: In the absence of an <@ERRORS></@ERRORS> block, <@ERROR> returns the first error. However, if an <@ERRORS>
</@ERRORS>
block is found, <@ERROR> tags outside of the block return nothing.


Error Part

Description

CLASS

"Internal" (Tango error), "DBMS" (database server error), or "External", (external action error).

APPFILENAME

The file name of the application file that generated the error.

APPFILEPATH

The relative path of the application file that generated the error.

POSITION

The name of the action that generated the error, if applicable.

NUMBER1

The main error number.

NUMBER2

The secondary error number.

MESSAGE1

The main error message.

MESSAGE2

The secondary error message.

Example

<H3>Error</H3>
An error occurred while processing your request:
<BR>
<@ERRORS>
APPFILE Path:<B><@ERROR PART="APPFILEPATH"></B><BR>
APPFILE Name:<B><@ERROR PART="APPFILENAME"></B><BR>
Position:<B><@ERROR PART="POSITION"></B><BR>
Class:<B><@ERROR PART="CLASS"></B><BR>
Main Error Number: <B><@ERROR PART="NUMBER1"></B>
<BR>
</@ERRORS>

This example returns all of the error information for each error encountered during the current action execution.

See Also

defaultErrorFile
Encoding Attribute
<@ERRORS> </@ERRORS>



[TOC] [Prev] [Next] [Bottom]



docs@pervasive.com

Copyright © 1998, Pervasive Software Inc. All rights reserved.