Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Raising exceptions from PLSQL to Java
A copy of this was sent to billmil_at_my-deja.com
(if that email address didn't require changing)
On Thu, 30 Dec 1999 17:58:07 GMT, you wrote:
>Can a PL/SQL program raise an exception to a calling Java program (i.e.
>running on the server)?
>
>I've tried using both RAISE and RAISE_APPLICATION_ERROR in the
>exception handling section of the PLSQL code. Neither seems to work.
>
>Any suggestions?
>
>Example PLSQL code:
> EXCEPTION
> WHEN OTHERS
> THEN BEGIN
> RAISE_APPLICATION_ERROR (-2001, SQLERRM);
> END;
>
>thanks.
>
>
>
>Sent via Deja.com http://www.deja.com/
>Before you buy.
What do you mean "neither seems to work". It causes an error to be sent backup to the java program that will manifest itself as a SQLException in java.
can you post a non-working example of the java code?
--
See http://osi.oracle.com/~tkyte/ for my columns 'Digging-in to Oracle8i'...
Current article is "Part I of V, Autonomous Transactions" updated June 21'st
Thomas Kyte tkyte_at_us.oracle.com Oracle Service Industries Reston, VA USA
Opinions are mine and do not necessarily reflect those of Oracle Corporation Received on Thu Dec 30 1999 - 12:44:57 CST
![]() |
![]() |