adding error handling
Merge pull request #2 from iros/error-handling

adding error handling