About 117,000 results
Open links in new tab
  1. Python's raise: Effectively Raising Exceptions in Your Code

    When you use the raise statement in Python to raise (or throw) an exception, you signal an error or an unusual condition in your program. With raise, you can trigger both built-in and custom exceptions.

  2. Python Raise Keyword - GeeksforGeeks

    Jul 23, 2025 · The raise keyword raises an error and stops the control flow of the program. It is used to bring up the current exception in an exception handler so that it can be handled further up the call stack.

  3. 8. Errors and Exceptions — Python 3.14.3 documentation

    2 days ago · The sole argument to raise indicates the exception to be raised. This must be either an exception instance or an exception class (a class that derives from BaseException, such as …

  4. Python raise Keyword - W3Schools

    Definition and Usage The raise keyword is used to raise an exception. You can define what kind of error to raise, and the text to print to the user.

  5. How to use "raise" keyword in Python - Stack Overflow

    raise without any arguments is a special use of python syntax. It means get the exception and re-raise it. If this usage it could have been called reraise. From The Python Language Reference: If no …

  6. What Is the Raise Statement and How Does It Work?

    The raise statement is used to explicitly throw an exception at any point in your program, allowing you to signal that an error condition has occurred or that certain requirements haven't been met. Python's …

  7. Python python-raise-keyword | Coddy Reference

    Learn about the Python raise keyword, its syntax, and how to use it for exception handling in Python programming. Includes examples and best practices.