python - Why the exception class created cannot run in the raiser function -
can let me know why exception class created cannot run in raiser function?
class e3exception(exception): pass class e3oddexception(e3exception): pass def raiser (x): if (int(x)%2==1): raise e3oodexception elif (int(x)%2==0): raise e3exception elif x=='csc148': e.message=+'hi,brian' elif (x==str & int(x)!=int): raise valueerror elif (x!=str & x!=int): raise typeerror
thanks
Comments
Post a Comment