tr:propagate-caught-error (in library simple-progress-msg.xpl) propagate-caught-error

propagate-caught-error

This step redirects an error to a status text file and prints a cx:message. If option fail-on-error is set to true, the error is reproduced with an attached error code.

Input Ports

NameDocumentationConnections

source

Input port: source

A c:errors document that is on the error port of a p:catch step

Output Ports

NameDocumentationConnections

result

Output port: result

If option fail-on-error is not set to true, then the output is a c:errors document. Additionally, two attributes are attached:

  • type: severity of the error
  • code: error code

Options

NameDocumentationDefault

fail-on-error

Option: fail-on-error

If this option is set to true, the pipeline fails with a p:error.

'false'

rule-family

Option: rule-family

Specifies the category of the errors.

'internal'

code

Option: code

Sets the error code, that is attached as code attribute to the c:errors document.

'tr:UNSP01'

severity

Option: severity

Sets the severity, that is attached as type attribute to the c:errors document.

'fatal-error'

msg-file

Option: msg-file

Filename of the plain text file, that contains the error message.

'unspecified-error.txt'

status-dir-uri

Option: status-dir-uri

URI of the directory, where the status message file is stored.

'debug/status'

Subpipeline

StepInputsOutputsOptions

p:xslt error-msg

source

source on propagate-caught-error

parameters

p:empty

stylesheet

 <xsl:stylesheet version="2.0">
   <xsl:template match="c:errors | c:error">
     <xsl:element name="{replace(name(), 'error', 'message')}">
       <xsl:copy-of select="@*"/>
       <xsl:apply-templates/>
     </xsl:element>
   </xsl:template>
 </xsl:stylesheet>

result

tr:simple-progress-msg write-progress-msg

source

result on error-msg

msgs

result on error-msg

result

file = $msg-file

status-dir-uri = $status-dir-uri

cx:message output-error-msg

source

result on write-progress-msg

result

message = /c:errors

p:sink d67e402

source

result on output-error-msg

p:add-attribute add-family

source

source on propagate-caught-error

result

attribute-name = 'tr:rule-family'

match = '/c:errors'

attribute-value = $rule-family

p:add-attribute add-code

source

result on add-family

result

attribute-name = 'code'

match = '/c:errors/c:error[last()]'

attribute-value = $code

p:add-attribute add-severity

source

result on add-code

result

attribute-name = 'type'

match = '/c:errors/c:error[last()]'

attribute-value = $severity

p:choose d67e424

$fail-on-error = 'true'

p:error d67e428

If you use a prefix in the error code, you might have to declare it in this file.

source

result on add-severity

result

code = $code

p:otherwise

p:identity d67e444

source

result on add-severity

result

Used by