ElishaMoshe
asked on
Handling Java Exceptions from PL/SQL Code
I loaded a Java class into the DB, and wrapped it with a pl\sql package.
I would like to know if there is a way to catch exceptions thrown by the Java class and handle them in the pl\sql package?
Thanks,
Yoni.
I would like to know if there is a way to catch exceptions thrown by the Java class and handle them in the pl\sql package?
Thanks,
Yoni.
ASKER
Hi daniels,
I checked out your suggestion, but it only works in Forms & Reports 9i, not in PL\SQL.
Instead, I found this:
http://www.unix.org.ua/orelly/oracle/guide8i/ch09_08.htm
under:
"9.8.5 Exception Handling with Java".
This looks like it could be useful, even if it is not the most elegant solution...
I checked out your suggestion, but it only works in Forms & Reports 9i, not in PL\SQL.
Instead, I found this:
http://www.unix.org.ua/orelly/oracle/guide8i/ch09_08.htm
under:
"9.8.5 Exception Handling with Java".
This looks like it could be useful, even if it is not the most elegant solution...
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
exc ora_java.jobject;
. . .
BEGIN
[ do some operations ]
EXCEPTION
WHEN ORA_JAVA.EXCEPTION_THROWN THEN
exc := ORA_JAVA.LAST_EXCEPTION;
MESSAGE(Exception_.getMess
ORA_JAVA.CLEAR_EXCEPTION;
END;
found this, hope this helps.
daniels