SPFE Documentation | Collections > SPFE Function Reference > error

Template: error

Description

Used to report an error in a script. The error template terminates the script unless the terminate-on-error parameter is set to false.

Source file

$SPFEOT_HOME/1.0/scripts/common/utility-functions.xsl

Parameters

message

Type: item()*

The error message to report. The template outputs this message prefixed with "ERROR: ".

in

Type: item()*

A string describing the location where the error occurred. This might be a location in a data file or in a script, depending on what would be most useful to the user in identifying and fixing the source of the problem.

Definition

            <xsl:template name="sf:error">
		               <xsl:param name="message"/>
		               <xsl:param name="in">Not specified.</xsl:param>
		               <xsl:message >**********************************************************</xsl:message>
		               <xsl:message select="'ERROR: ', string-join($message,'')"/>
		               <xsl:message select="'In: ', string-join($in, '')"/>
		               <xsl:message >**********************************************************</xsl:message>
		               <xsl:message terminate="{$terminate-on-error}"/>
	           </xsl:template>
         
            <xsl:template name="sf:error">
		               <xsl:param name="message"/>
		               <xsl:param name="in">Not specified.</xsl:param>
		               <xsl:message >**********************************************************</xsl:message>
		               <xsl:message select="'ERROR: ', string-join($message,'')"/>
		               <xsl:message select="'In: ', string-join($in, '')"/>
		               <xsl:message >**********************************************************</xsl:message>
		               <xsl:message terminate="{$terminate-on-error}"/>
	           </xsl:template>