update gitignore
refactor error handling

there have been some missing class definitions in the
other PR. Now fixed.
Merge pull request #27 from sumcumo/refactor_error_class

Refactor error class