About 476,000 results
Open links in new tab
  1. How to use "raise" keyword in Python - Stack Overflow

    63 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.

  2. 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?

  3. How do I stop a program when an exception is raised in Python?

    Jan 13, 2009 · I need to stop my program when an exception is raised in Python. How do I implement this?

  4. exception - What does raise in Python raise? - Stack Overflow

    Dec 23, 2010 · I expected it to raise Exception: b (need I explain why?). Why does the final raise raise the original exception rather than (what I thought) was the last exception raised?

  5. Python "raise from" usage - Stack Overflow

    What's the difference between raise and raise from in Python?

  6. "raise" at the end of a python function outside "try" or "except" …

    I had a problem like this where I needed to raise a previously caught exception outside the try/except block if my function didn't return a value. I did a bit of looking around in the sys and …

  7. python - Difference between "raise" and "raise e"? - Stack Overflow

    Mar 22, 2016 · In python, is there a difference between raise and raise e in an except block? dis is showing me different results, but I don't know what it means. What's the end behavior of both? …

  8. What's the difference between raise, try, and assert?

    108 I have been learning Python and the raise function* and assert are really similar (what I realised is that both of them crash the app, unlike try - except) and I can't see a situation …

  9. How do I raise a FileNotFoundError properly? - Stack Overflow

    Mar 18, 2016 · I use a third-party library that's fine but does not handle inexistant files the way I would like. When giving it a non-existant file, instead of raising the good old …

  10. python - When to use `raise_for_status` vs `status_code` testing ...

    Almost always, raise_for_status() is better. The main reason is that there is a bit more to it than testing status_code == 200, and you should be making best use of tried-and-tested code …