hello-world: use $ExitError to indicate unintentional error
This commit is contained in:
		
							parent
							
								
									43d0f9f371
								
							
						
					
					
						commit
						69b724ccb9
					
				
					 1 changed files with 4 additions and 1 deletions
				
			
		| 
						 | 
					@ -9,6 +9,7 @@
 | 
				
			||||||
:global GlobalFunctionsReady;
 | 
					:global GlobalFunctionsReady;
 | 
				
			||||||
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
 | 
					:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					:local ExitOK false;
 | 
				
			||||||
:do {
 | 
					:do {
 | 
				
			||||||
  :local ScriptName [ :jobname ];
 | 
					  :local ScriptName [ :jobname ];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -21,4 +22,6 @@
 | 
				
			||||||
  } else={
 | 
					  } else={
 | 
				
			||||||
    $SendNotification2 ({ origin=$ScriptName; subject="Hello..."; message="... world!" });
 | 
					    $SendNotification2 ({ origin=$ScriptName; subject="Hello..."; message="... world!" });
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
} on-error={ }
 | 
					} on-error={
 | 
				
			||||||
 | 
					  :global ExitError; $ExitError $ExitOK [ :jobname ];
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue