https://bugzilla.redhat.com/show_bug.cgi?id=917045 - fixed exception handling
Merge pull request #1080 from andytaylor/master

https://bugzilla.redhat.com/show_bug.cgi?id=917045 - fixed exception handling