Different error handling.
Polishing.
Merge pull request #1 from cleandart/error-handling

Different error handling.