added error handling for known m2x errors. added unknown error for catching other errors which are unknown.