Unsupported Screen Size: The viewport size is too small for the theme to render properly.

Stored Procedure Error Handling

forums forums SQLyog Using SQLyog Stored Procedure Error Handling

  • This topic is empty.
Viewing 2 reply threads
  • Author
    Posts
    • #13298
      Snappit
      Member

      Hi Guys,

       

      I’m in the middle creating stored procedure in SQLyog. Could someone help me on error handling? can I use try and cathe in SQLyog? please help me give some sample.

       

      many thanks

    • #35139

      Hi,

       

      Try catch is not used in MySQL. 

      Mostly error handling in stored procedure is done by DECLARE … HANDLER please refer-http://dev.mysql.com/doc/refman/5.7/en/declare-handler.html

       

      You can use this in stored procedure to execute some specific task if error occurred(same as you do in catch) and then exit or continue.

       

      To  derive the exact nature of the error you can use GET DIAGNOSTICS please refer-http://dev.mysql.com/doc/refman/5.6/en/get-diagnostics.html

       

      SQLyog doesn’t have any specialized way of doing error handling.

    • #35140
      Snappit
      Member

      thanks for your help

Viewing 2 reply threads
  • You must be logged in to reply to this topic.