Skip to content

Commit

Permalink
Update example with exception to use .format instead of %
Browse files Browse the repository at this point in the history
  • Loading branch information
AWegnerGitHub committed Nov 7, 2016
1 parent fc27719 commit 9761710
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/user/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,10 @@ The exception has several values available to help troubleshoot the underlying
issue::

except stackapi.StackAPIError as e:
print(" Error URL: %s" % (e.url))
print(" Error Number: %s" % (e.error))
print(" Error Code: %s" % (e.code))
print(" Error Message: %s" % (e.message))
print(" Error URL: {}".format(e.url))
print(" Error Code: {}".format(e.error_code))
print(" Error Name: {}".format(e.error_name))
print(" Error Message: {}".format(e.error_message))

This will print out the URL that was being accessed, the error number that the
API returns, the error code the API returns and the error message the API
Expand Down

0 comments on commit 9761710

Please sign in to comment.