You can throw a Java exception from your COBOL code. The exception object can be any Java class.
The javasup class provides two methods for throwing exceptions, namely: throwException and throwNewException. You use these methods as follows:
invoke javasup "throwException" using aCOBOLProxy
invoke javasup "throwNewException" using javaclassdescription
For details of the javasup class and its methods, see the Java Run-time Class Library Reference, which is in help\mfcobol.docs.zip (Windows) or docs/mfcobol.docs.zip (UNIX) in your COBOL development system installation.