)]}'
{"karbor/services/protection/provider.py":[{"author":{"_account_id":2023,"name":"Saggi Mizrahi","email":"ficoos+osreview@gmail.com","username":"ficoos"},"change_message_id":"e1931f12b3444698333bfd03b8543388296d87cf","unresolved":false,"context_lines":[{"line_number":275,"context_line":"    def show_provider(self, provider_id):"},{"line_number":276,"context_line":"        try:"},{"line_number":277,"context_line":"            return self.providers[provider_id]"},{"line_number":278,"context_line":"        except Exception:"},{"line_number":279,"context_line":"            raise exception.ProviderNotFound(provider_id\u003dprovider_id)"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a74a57a_ad469578","line":278,"range":{"start_line":278,"start_character":15,"end_line":278,"end_character":24},"updated":"2016-11-28 14:41:36.000000000","message":"You want to catch KeyError, catching Exception also catches other errors and hides them from the developer.\n\n var \u003d 5\n \n try:\n var2 \u003d vra\n except Exception:\n print(\"ERROR\")\n\nThis will print ERROR when you really wanted to see a NameError\nCatch Exception when logging the actual exception or when reraising","commit_id":"9df093defa892142225d98d8710d9994c621f54a"}]}
