mysql error handling with signal/resignal -
I have to do a check for valid load types. If the load type in my process is invalid, then through signal I I want to throw an error message. I want a generic XIT handler for any other unexpected errors that will roll back any changes. The problem is that the generic XIT handler is taking preference on my custom signal and I'm getting 'faced with eclipsection' until I remove the generic extender handler, in that case I get 'wrong type typed' / P>
code: wrong mistake_load_type condition for SQLSTATE '22012'; Wrong_load_type set refresh set MESSAGE_TEXT = exit handler = 'Load type is incorrect'; To remove the removal for SQL Exceptions, start SQLWARNING 'Select' SQLException occurred '; Rollback; End; If (v_load_type! = 'Right type') signals wrong_load_type; end if;
try it
wrong for SQLSTATE The wrong load type condition '22012'; Exit Hangler for Wrong Wrong_load_type type 'Select Load type is incorrect'; End; To remove the removal for SQL Exceptions, start SQLWARNING 'Select' SQLException occurred '; Rollback; End; If (v_load_type! = 'Right type') signals wrong_load_type; end if;
Comments
Post a Comment