The throw statement issues a customized exception.
For a description of exception handling in general, see “Try statement.”
Record CustomerException type Exception customerNumber INT; end
try if (..) throw new CustomerException { message = "Illegal customer number", messageID = "Custom0123", customerNumber = currentNumber }; else .. end onException(except CustomerException) // handle the exception onException (except AnyException) // handle other exceptions end
nullEx NullValueException; try if (..) throw nullEx; else .. end onException(exception NullValueException) // handle the exception onException (except AnyException) // handle other exceptions end
Target | Issue |
---|---|
Java | No issues |
JavaScript | No issues. |