on 2014 Jan 31 10:23 AM
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??
Request clarification before answering.
User | Count |
---|---|
62 | |
7 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.