Python - Custom Exceptions
Which of these is a correct way to raise a custom exception named
MyError?MyError?raise keyword followed by the exception instance.raise MyError('message'). Options A and B use throw, which is not Python syntax. raise Exception('MyError') raises a generic Exception, not the custom one.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions