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;
 | 
			
		||||
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
 | 
			
		||||
 | 
			
		||||
:local ExitOK false;
 | 
			
		||||
:do {
 | 
			
		||||
  :local ScriptName [ :jobname ];
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -21,4 +22,6 @@
 | 
			
		|||
  } else={
 | 
			
		||||
    $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