Better exception handling in GPGKeyManager.