I need to implement some error handling in MySQL. I come from a .net background so was expecting this be straightforward but it doesn't seem that simple. Another EE member kinly provided the following links.
Maybe I am missing something but these seem to assume that I will know what type of error it is that I am going to catch, is there no way to create a function that will run a piece of code regardless of any
error being thrown? My function calls a view and inserts the results into a table, if the view cannot be called for any reason I need to know and trap the error.
Is there any chance one of you MySQL experts could provide an example of a simple function that will catch any errors that are thrown?
MySQL Signal Conditions
MySQL Declare Handlers
Let me know if you need any more info