rename error.h to mshare_error.h and refine some code

rename error.h to mshare_error.h and refine some code