void raiseException(String exceptionType, String message) void raiseException(String exceptionType, int messageNum, String parameter[,...]) void raiseException(RunTimeEntityException exception)
None.
The raiseException() method has three forms:
The following example uses the first form of the method to raise an exception of ServiceCallException type. The text is embedded in the method call.
raiseException(ServiceCallException, "Attempt to validate Customer failed.");
The next example raises an exception of ServiceCallException type. The message in the message file is as follows:
23 Customer update failed for CustomerID={1} CustomerName={2}
The raiseException() method invokes the message, retrieves the values of the message parameters from the fromCustomer variable, and passes them to the raiseException() call.
raiseException(ServiceCallException, 23, fromCustomer.getString("CustomerID"), fromCustomer.getString("CustomerName"));
The final example raises a previously handled exception. The system-defined variable currentException is an exception object that contains the exception.
raiseException(currentException);