Java Object Language Elements |
Turns the exception debug logging off or on and prints exception
information.
object.EXCEPTIONDESCRIBE(status);
|
- 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. |
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]](../../../../common/63294/HTML/default/images/cautend.gif)
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)
Copyright © 2011 by SAS Institute Inc., Cary, NC, USA. All rights reserved.