handle exceptions, close #6 #2
Merge pull request #9 from martiner/exceptions

handle exceptions, close #6 #2