Skip to main content

One doc tagged with "raise"

View all tags

Raising Exceptions: The `raise` Keyword

We have learned how to handle exceptions that Python raises automatically, like ValueError or FileNotFoundError. But what if you encounter an error condition in your own code that isn't covered by a built-in exception?