EXCEPTIONDESCRIBE Method

Turns the exception debug logging on or off and prints exception information.
Category: Exception
Applies to: Java object

Syntax

object.EXCEPTIONDESCRIBE(status);

Arguments

object
specifies the name of the Java object.
status
specifies whether exception debug logging is on or off. The status argument can be one of the following values:
0
specifies that debug logging is off.
1
specifies that debug logging is on.
Default:0 (off)
Tip:The status value that is returned by Java is of type DOUBLE, which corresponds to a SAS numeric data value.

Details

The EXCEPTIONDESCRIBE method is used to turn exception debug logging on or off. If exception debug logging is on, exception information is printed to the JVM standard output.
Note: By default, JVM standard output is redirected to the SAS log.

Example: Printing Exception Information to Standard Output

In the following example, exception information is printed to the standard output.
/* Java code */
public class a
   {
      public void m() throws NullPointerException
      {
         throw new NullPointerException();
      }
   } 
/* DATA step code */
data _null_;
   length e 8;
   dcl javaobj j('a');
   j.exceptiondescribe(1);   
   rc = j.callvoidmethod('m');
run;
The following lines are written to the SAS log:
java.lang.NullPointerException
     at a.m(a.java:5)