Reputation: 14212
In a stored procedure I have used to;
raise_application_error (-20010, 'My Message');
to raise a custom error in a certain situation. What I am trying to do is when I make my JDBC call from java, to be able to identify this error as not just being a SQLException so that I can handle it differently. I though I could identify it by the errorCode, but that seems to always be 17062 and not -20010.
Is there another way to do this, or am I missing something?
Upvotes: 2
Views: 583
Reputation: 67792
you should get 20010 as your errorCode
. the ORA-17062
is an error for invalid ref cursors. Are you sure the procedure you are calling throws the custom error ?
Upvotes: 2