QuestionQ41Verified/Advanced Object-Oriented ProgrammingCopy linkReport a problemAsk AstroTutorSave questionExamine the following code snippet and choose the statement that most accurately describes it. AThe code is an example of implicitly chained exceptions.BThe code is erroneous as the OwnMath class does not inherit from any Exception type classCThe code is fine and the script execution is not interrupted by any exception.DThe code is an example of explicitly chained exceptionsShow AnswerAnswerExplanationA value raised with raise must be an exception class or instance derived from BaseException. Because OwnMath is an ordinary class rather than an exception subclass, raise OwnMath from e raises a TypeError instead of validly raising a chained custom exception. Python Built-in Exceptions documentationLearn morePython Built-in Exceptions documentationShow comments1Show commentsCommunity DiscussionNo comments yet. Be the first to start the discussion!
Community Discussion