How to catch exception from java stored procedure with pl/sql
From: Peter Valencic <peterv_at_in2.si>
Date: 21 Feb 2002 05:26:34 -0800
Message-ID: <16290d4d.0202210526.fd500a8_at_posting.google.com>
clas xxx
{
public static void doSomething() throws Exception
{
try
{
//zero divide exception..
}
catch(Exception e)
{
throw new Exception(e.toString());
}
}
Date: 21 Feb 2002 05:26:34 -0800
Message-ID: <16290d4d.0202210526.fd500a8_at_posting.google.com>
How to catch exception or better the Error number from java procedure with pl sql...
example
the java function:
clas xxx
{
public static void doSomething() throws Exception
{
try
{
//zero divide exception..
}
catch(Exception e)
{
throw new Exception(e.toString());
}
}
in my PL/SQL...
declare
i integer;
begin
xxx.doSomething();
exception
when others
then
begin
dbms_output.put_line('Exception: ' || SQLERRM);
dbms_output.put_line('Exception: ' || sqlcode);
end;
end;
This work fine, but it allways return the same number of exception
because
the Java procedure or function is called from pl/sql..
Is there a possibility to throw from java procedure a custom error
number and than display or handle it with dbms_output.put_line('Error
number from java class: ' || sqlcode);
???
thnx..
Peter Valencic
} Received on Thu Feb 21 2002 - 14:26:34 CET