Python:Control structures
Revision as of 23:13, 22 January 2018 by Hdridder (talk | contribs) (Created page with "Category:Python To catch all exceptions (not wise) ==Exception handling== <syntaxhighlight lang=python> try: block except: blockifexceptionisthrown </syntaxhighli...")
To catch all exceptions (not wise)
Exception handling
try:
block
except:
blockifexceptionisthrown
You better only catch the exceptions you expect. You can choose from the available exceptions [1]
- except NameError
- The variable does not exist