When defining a custom exception, it should typically be derived from the built-in ____ class.

  • CustomException
  • Error
  • Exception
  • Throwable
When defining custom exceptions in many programming languages, including Python and Java, it's a best practice to derive them from a built-in exception class like 'Exception.' This allows your custom exception to inherit essential exception handling features.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *