title: How to catch exceptions from botocore
body: <p>I am getting the below error while using <code>boto3</code> with <code>Amazon SNS</code>. I want to catch <code>InvalidParameterException</code> only, how can I do the same? </p>
  
  <pre><code>Traceback (most recent call last):
    File "D:\Logger\Notification.py", line 279, in &lt;module&gt;
      Push.subscribe(token1, 'android')
    File "D:\Logger\Notification.py", line 119, in subscribe
      'Enabled': b'True'
    File "C:\Python27\lib\site-packages\botocore\client.py", line 310, in _api_call
      return self._make_api_call(operation_name, kwargs)
    File "C:\Python27\lib\site-packages\botocore\client.py", line 599, in _make_api_call
      raise error_class(parsed_response, operation_name)
  botocore.errorfactory.InvalidParameterException: An error occurred (InvalidParameter) when calling the CreatePlatformEndpoint operation: Invalid parameter: Token Reason: Endpoint arn:aws:sns:us-west-2:252285631092:endpoint/GCM/Test/06c4448e-545b-312a-978f-98af5d5829e4 already exists with the same Token, but different attributes.
  </code></pre>
  
  <p>If I try to catch <code>InvalidParameterException</code>, it shows </p>
  
  <pre><code>NameError: global name 'InvalidParameterException' is not defined
  </code></pre>
  
  <p>I have imported <code>botocore</code>. Now if I try to catch <code>botorcore.errorfactory.InvalidParameterException</code> it shows.</p>
  
  <pre><code>AttributeError: 'module' object has no attribute 'InvalidParameterException'
  </code></pre>