throw command


throw expression


This command throws and exception containing error message given by the obligatory expression argument. If the exception is not handled by some surrounding try block, the execution is stopped immediatelly and the error message is printed.

Note: There is a special class of internal exceptions with error message starting with a word 'UNCATCHABLE'. Such exceptions are not trapped by try constructions and should be avoided in ordinary XSH scripts.

See Also



Flow control