Top "Try-except" questions

A form of error handling in Python and Delphi, similar to try/catch in C-like languages.

How to properly ignore exceptions

When you just want to do a try-except without handling the exception, how do you do it in Python? Is …

python exception try-except
How to retry after exception?

I have a loop starting with for i in range(0, 100). Normally it runs correctly, but sometimes it fails due to …

python loops exception try-except
syntaxError: 'continue' not properly in loop

I have been struggling with this error for a while now and there seems to be different opinions regarding why …

python twitter continue try-except
python 3 try-except all with error

Is it possible to do a try-except catch all that still shows the error without catching every possible exception? I …

python python-3.x try-except
Python try finally block returns

There is the interesting code below: def func1(): try: return 1 finally: return 2 def func2(): try: raise ValueError() except: return 1 finally: …

python try-except try-finally
How to make a variable inside a try/except block public?

How can I make a variable inside the try/except block public? import urllib.request try: url = "http://www.google.…

python python-3.x scope local-variables try-except
How to correctly write Try..Finally..Except statements?

Take the following code as a sample: procedure TForm1.Button1Click(Sender: TObject); var Obj: TSomeObject; begin Screen.Cursor:= crHourGlass; …

delphi try-finally try-except
What's the correct Try Exception for NoneType when using regex's .groups() function

I'm trying to use the following code: try: clean = filter(None, re.match(r'^(\S+) (.*?) (\S+)$', full).groups()) except …

python exception python-2.7 nonetype try-except
Try/except when using Python requests module

Doing some API testing and trying to create a function that given an inputted URL it will return the json …

python python-requests try-except
Python Selenium Webdriver - Try except loop

I'm trying to automate processes on a webpage that loads frame by frame. I'm trying to set up a try-except …

python selenium try-except