[Swift-user] terminate the workflow

Justin M Wozniak wozniak at mcs.anl.gov
Mon Apr 4 10:47:12 CDT 2011


On Mon, 4 Apr 2011, tianyu491433909 wrote:

> I'm sorry, I mean Can I terminate the workflow through the code?in 
> addition to System.exit()

One thing you can try is the new assert() built-in.  assert() takes up to 
two arguments.  The first is either a boolean or an int.  If false or 0, 
it will bring the run down and swift will exit with code 2.  The optional 
second argument is a string that is reported if the assertion fails.

This is an experimental feature.

 	Justin

-- 
Justin M Wozniak


More information about the Swift-user mailing list