fixed resErr handle exception