It's late Friday afternoon and things are not working as I think it should or I could just be tired and can not think straight, so I would be happy for some help, thanks in advance ... I want to know the expected behaviour for try/catch and EXCEPTION I thought: CREATE PROCEDURE DUMMIE BEGIN TRY ---calls other functions which makes different inserts END TRY BEGIN CATCH -- If the inserts fails I end up here without any display of error -- messages -- I can do rollback and call another procedure which does a -- insert and do commit END CATCH; Is this wrong? What I get: when the inserts fails I get an pop-up with an error message but I also end up in catch section, but the procedures are not called... and I can also add that this procedure should be used in a scheduled job...scheduled event EXCEPTION If I only got (in my procedure) EXCEPTION WHEN OTHERS THEN shouldn't this catch all types of errors in the procedure without displaying any error messages? And I would then be able to do rollback and call other procedures, do commit??
This question is marked "community wiki".
|
Please show us the actual code, and the actual error message (popup).
Note that not all SQL codes are treated as exceptions; e.g., row not found.
In addition to Breck's advice: To cite from Ivan, there are differences between errors noted during the opening and the fetching of result sets - cf. this FAQ (I don't claim it does relate anyhow to your question, not n´knwoing the actual code):
How to Form an Exception Handler
What is the reason for the failure of INSERT?