forced to close current mysql connection if there is any kind of exception raised by cursor