table: refactor the code to check the err (#13780)
table: refactor the code to check the err (#13780)


ming-relax/tidb,ngaut/tidb,pingcap/tidb,pingcap/tidb,coocood/tidb,ngaut/tidb,kyle-wang/tidb,kyle-wang/tidb,c4pt0r/tidb,c4pt0r/tidb,kyle-wang/tidb,pingcap/tidb,EvilMcJerkface/tidb,ngaut/tidb,pingcap/tidb,kyle-wang/tidb,EvilMcJerkface/tidb,ming-relax/tidb,kyle-wang/tidb,c4pt0r/tidb,XuHuaiyu/tidb,coocood/tidb,kyle-wang/tidb,Cofyc/tidb,XuHuaiyu/tidb,Cofyc/tidb,c4pt0r/tidb,c4pt0r/tidb,ngaut/tidb,ngaut/tidb,ngaut/tidb,c4pt0r/tidb,pingcap/tidb,pingcap/tidb