Previous Page | Next Page

Java Object Language Elements

EXCEPTIONDESCRIBE Method



Turns the exception debug logging off or on and prints exception information.
Category: Exception

Syntax
Arguments
Details
Example
See Also

Syntax

object.EXCEPTIONDESCRIBE(status);


Arguments

object

specifies the name of the java object.

status

specifies whether exception debug logging is on or off. status 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.  [cautionend]


Example

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)


See Also

Method:

EXCEPTIONCHECK Method

EXCEPTIONCLEAR Method

Previous Page | Next Page | Top of Page