// // This example demonstrates how to catch exceptions and continue normal execution of the script // void ScriptMain() { try { // Try something crazy BoardLib.SetVariable("someWonkyVariableName", true); } catch { // Display a message if we get an exception Dialog.ShowDialog("Got an exception because of an invalid variable name"); } finally { // This code is garanteed to be executed, whether or not an exception was thrown Console.WriteLine("I'll always be there"); } }