Mysql test case add when connected error, catch ex