You can write an expression that tests for an error and if an error has occurred, calls THROW, passing a custom error message. When the expression evaluator encounters THROW, it stops processing the expression and outputs the custom error message to the console log.
The THROW function has the following format:
THROW(error_message)
The THROW function accepts the following parameter:
error_message (string)
Specifies the custom error message that is output to the console log.
The THROW function does not return.
EXISTS('MyFile') ? #Process('MyFile') : THROW('File does not exist.')
Message Output to the Console Log: 'File does not exist.'
VEXIST(#Sortname) ? #Sortname : THROW('Sortname is not defined.')
Message Output to the Console Log: 'Sortname is not defined.'
Copyright © 2010 CA. All rights reserved. | Email CA about this topic |