// Script function: Demo of Exception Handling: Try, Catch and Throw.

// Unless named starting with GlobalSino, EM, My, Self, the function commands are defined 
//by Gatan DM, please see at link: http://www.globalsino.com/EM/page2597.html



result ("Start\n")
try 
{ 
result ("Inside try block\n")
result ("Try second\n")
number test = 1
if(test==1) throw ("99") 
result ("This will not execute")
}

catch 
{
result ("Caught an exception value is: 99\n")
result ("End of catch")
}

result ("The end")