letex: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
Name | Documentation | Connections |
---|---|---|
sourceⓅ | Input port:
|
Output Ports
Name | Documentation | Connections |
---|---|---|
resultⓅ | Output port:
|
Options
Name | Documentation | Default |
---|---|---|
fail-on-error | Option:
| 'false' |
code | Option:
| 'letex:UNSP01' |
severity | Option:
| 'fatal-error' |
msg-file | Option:
| 'unspecified-error.txt' |
status-dir-uri | Option:
| 'debug/status' |
Subpipeline
Step | Inputs | Outputs | Options | ||
---|---|---|---|---|---|
p:xslt error-msg |
| result | |||
letex:simple-progress-msg write-progress-msg | result | file = $msg-file status-dir-uri = $status-dir-uri | |||
cx:message output-error-msg |
| result | message = /c:errors | ||
p:sink d104e388 |
| ||||
p:add-attribute add-code |
| result | attribute-name = 'code' match = '/c:errors/c:error[last()]' attribute-value = $code | ||
p:add-attribute add-severity | result | attribute-name = 'type' match = '/c:errors/c:error[last()]' attribute-value = $severity | |||
p:choose d104e405 | |||||
$fail-on-error = 'true' | |||||
p:error d104e409 If you use a prefix in the error code, you might have to declare it in this file. |
| result | code = $code | ||
p:otherwise | |||||
p:identity d104e425 |
| result |