About 10,700 results
Open links in new tab
  1. Python Raise Keyword - GeeksforGeeks

    May 12, 2026 · The raise keyword raises an exception and immediately stops the normal execution of the program. The control is then transferred to the nearest matching except block (if present), …

  2. Python's raise: Effectively Raising Exceptions in Your Code

    Jan 25, 2025 · In this tutorial, you'll learn how to raise exceptions in Python, which will improve your ability to efficiently handle errors and exceptional situations in your code. This way, you'll write more …

  3. Python raise Keyword - W3Schools

    W3Schools offers free online tutorials, references and exercises in all the major languages of the web. Covering popular subjects like HTML, CSS, JavaScript, Python, SQL, Java, and many, many more.

  4. 8. Errors and Exceptions — Python 3.14.6 documentation

    8.4. Raising Exceptions ¶ The raise statement allows the programmer to force a specified exception to occur. For example:

  5. Manually raising (throwing) an exception in Python

    How do I raise an exception in Python so that it can later be caught via an except block?

  6. raise | Python Keywords – Real Python

    Tutorial Python's raise: Effectively Raising Exceptions in Your Code In this tutorial, you'll learn how to raise exceptions in Python, which will improve your ability to efficiently handle errors and exceptional …

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

    I have read the official definition of "raise", but I still don't quite understand what it does. In simplest terms, what is "raise"? Example usage would help.

  8. 7. Simple statements — Python 3.11.15 documentation

    Changed in version 3.11: If the traceback of the active exception is modified in an except clause, a subsequent raise statement re- raise s the exception with the modified traceback.

  9. Python Try Except - W3Schools

    Raise an exception As a Python developer you can choose to throw an exception if a condition occurs. To throw (or raise) an exception, use the raise keyword.

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

    What does the raise statement do in Python? It catches exceptions. It manually triggers an exception. It ignores errors.