[categories] [index] [all (553)] [latest]
class MyException(Exception):
def __init__(self, value):
self.value = value
def __str__(self):
return repr(self.value)
def myFunction():
raise MyException("myValue")
def handleException():
try:
myFunction()
except MyException as e:
print("-- exception: %s" % e)
handleException();