next up previous contents 5
Next: Writing specialized exception handlers Up: Exception Handling Previous: Handling DHS Crashes   Contents

Throwing your own exceptions

The scripting engine will catch all un-handled errors and append these errors to the script's terminating DCS message. Therefore, the script writer may also throw exceptions that will automatically be transmitted out on the operation's completed message. For example, the following code within a script would terminate the script with a completed message and an error of negativeNumber. BLU-ICE clients could interpret this message and handle it however they wished.

	if { $value < 0 } {
		return -code error negativeNumber 
	}


next up previous contents 5
Next: Writing specialized exception handlers Up: Exception Handling Previous: Handling DHS Crashes   Contents
Scott McPhillips 2011-07-06