Python3 Exception Notes

Submitted by code_admin on Wed, 03/27/2019 - 11:49

Outputing execption

  1.   try:
  2.     objectStoreConfigDict = json.loads(objectStoreConfigJSON)
  3.   except Exception as err:
  4.     print(err) # for the repr
  5.     print(str(err)) # for just the message
  6.     print(err.args) # the arguments that the exception has been called with.
  7.     raise(InvalidObjectStoreConfigInvalidJSONException)

Tags

RJM Article Type
Quick Reference