better exception handling
Merge pull request #10 from daptiv/feature/exception_handling

better exception handling