什么是过早留下时髦脚本的最佳方法?
一个groovy脚本从给定的信息文件中读取一行然后进行一些验证工作,如果验证失败(数据不一致)脚本需要过早地离开流程.然后系统将再次调用脚本以读取同一信息文件的下一行
代码示例:
read a row
try{
//make some verification here
}catch(Exception e){
logger("exception on something occurred "+e,e)
//here need to leave a groovy script prematurely
}
Run Code Online (Sandbox Code Playgroud) groovy ×1