Welcome to the Quest CodeGen Utility Community
Advanced Search - Help - Search Toad World
Welcome, Guest
Login Login / Register
Help
NEW? Get Plugged In

Forums » CodeGen » Error Management and the Quest Development Architecture

Thread: qem and java

This question is not answered. Helpful answers available: 2. Answered answers available: 1.


Permlink Replies: 2 - Pages: 1 - Last Post: Oct 23, 2009 6:45 AM by: stevenfeuerstein
save

Posts: 1
Registered: 10/22/09
qem and java
Posted: Oct 22, 2009 1:53 AM
 
  Click to reply to this thread Reply

Hi all,

first of all thank you very much for providing such a good framework to the pl/sql community. I really appreciate using it.

Now to my question. Is there an easy way with qem to pass back an error number and its message to a Java SQLException and displaying the message and the code via the SQLExceptions methods getErrorCode() and getMessage() ?

If I simply call RAISE_APPLICATION_ERROR(-20100,'Emp not found'); I can simply catch this with getErrorCode or getMessage.

With qem the only way to get this information is afaik to call getErrorInfo but this is really hard to access via jdbc.

Any help youd be very appreciated!

Thanks in advance!

Michael



Fsilva


Posts: 425
Registered: 11/13/06
Re: qem and java
Posted: Oct 22, 2009 3:33 AM   in response to: save
 
  Click to reply to this thread Reply

Hi

I do not use java to do that, but did you check the help :"Process an error passed back to the host environment" and "Raise an error, passing context information" Topics?

Greetings
Filipe


"Walking on water and developing software from a specification are easy if both are frozen"
stevenfeuerstein


Posts: 204
Registered: 5/18/06
Re: qem and java
Posted: Oct 23, 2009 6:45 AM   in response to: save
 
  Click to reply to this thread Reply

Michael, the Java code can call one of the overloadings of
q$error_manager.get_error_info to retrieve the information and display it.

Regards, Steven


Legend
Guru: 2001 + pts
Expert: 751 - 2000 pts
Enthusiast: 31 - 750 pts
Novice: 0 - 30 pts
Moderators
Helpful answer (5 pts)
Answered (10 pts)

Point your RSS reader here for a feed of the latest messages in all forums