When raising a custom exception, the _______ method gets called to display the error message.

  • display_error
  • raise_message
  • str()
  • str()
When raising a custom exception, the __str__() method of the exception class gets called automatically to generate the error message. You can override this method to customize the error message displayed when the exception is raised.
Add your answer
Loading...

Leave a comment

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