fix error handling
Merge pull request #6 from jubatus/fix-error-handling

fix error handling