Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

TypeError: exceptions must derive from BaseException

#When using raise, it must be given an Exeption class or one that inherits from it.
#e.g.ValueError, IndexError, KeyError
raise ValueError("I'm a fancy error message")
Source by github.com #
 
PREVIOUS NEXT
Tagged: #exceptions #derive #BaseException
ADD COMMENT
Topic
Name
7+6 =