gongming: add the function to deal error