parameters: (e)
docstring: Gets the 'message' from an exception
docstring_summary: Gets the 'message' from an exception
docstring_tokens: Gets the message from an exception
function: def message(e):
      # type: (Exception) -> str
      """
      Gets the 'message' from an exception
      """
      # If we want the message, check if it exists
      # Supports Python2
      #
      # For python 3 call str will grab the message
      if hasattr(e, 'message'):
          return e.message
      else:
          return str(e)
function_tokens: def message ( e ) : # type: (Exception) -> str # If we want the message, check if it exists # Supports Python2 # # For python 3 call str will grab the message if hasattr ( e , 'message' ) : return e . message else : return str ( e )