fixed checked mode exceptions

Fix some checked mode exceptions from the git library, and some additional checked mode exceptions in our exception handling code. We had been assuming that we'd only be handling exceptions of type `Exception`, however any type can be thrown.

@gaurave