RAISE General Format RAISE Exception-Class Syntax Rules 1. Exception-Class is a java.lang.Exception class or any known subclass. General Rules 1. If caught, the EXCEPTION-OBJECT will be set to the instance of the Exception-Class Examples Raise an exception when passed string is too long. Uses a user defined Java Class StringTooLongException. configuration section. repository. class JString as "java.lang.String" class JStringTooLongException as "StringTooLongException". working-storage section. 77 StrExc object reference JStringTooLongException. 77 exception-message pic x any length. 77 j-exc-message object reference JString. procedure division. ... raise-exception. move "The string you passed is longer than defined" to exception-message set j-exc-message to exception-message. set StrExc to JStringTooLongException:>new(j-exc-message). raise StrExc. The Java Exception code is the following: /** * StringTooLongException.java */ /** * Signals that the passed string is too long * @version 1.0 * @author Veryant */ public class StringTooLongException extends InvalidDataException { public StringTooLongException() { super(); } public StringTooLongException(String message) { super(message); } }