Java in Forms: Exception_.toString [message #526303] |
Mon, 10 October 2011 08:24 |
jb_vincennes
Messages: 5 Registered: August 2007 Location: Paris
|
Junior Member |
|
|
Hi,
I have to implement exception handling in the exception block of a trigger, Quote:exception
when ora_java.java_error then
message( 'Unable to call out to java, ' || ora_java.last_error );
ORA_JAVA.CLEAR_EXCEPTION;
when ORA_JAVA.EXCEPTION_THROWN then
ex := ORA_JAVA.LAST_EXCEPTION;
message( Exception_.toString(ex));
-- lv_exception := Exception_.getMessage(ex);
I get an error for the line: 'message( Exception_.toString(ex));'
I have imported the java classes FException et IObject with their methods.
I have to create a Web Service Client, so I wonder if the paragraph Quote: when ORA_JAVA.EXCEPTION_THROWN then
ex := ORA_JAVA.LAST_EXCEPTION;
is mandatory.
Many thanks
|
|
|
Re: Java in Forms: Exception_.toString [message #526528 is a reply to message #526303] |
Tue, 11 October 2011 08:28 |
jb_vincennes
Messages: 5 Registered: August 2007 Location: Paris
|
Junior Member |
|
|
Hi
I have searched the Metalink bugs database and I have found that I need to import the "java.lang.Exception" class into the Forms / Programs / Import Java dialog box.
This class is not available in the tree.
I had to type java.lang.Exception in the field in the dialog box.
Now my trigger compiles.
|
|
|
|