Python Language Exceptions

From NovaOrdis Knowledge Base
Revision as of 23:19, 20 January 2022 by Ovidiu (talk | contribs) (Created page with "=Internal= * Python Language =Overview= <code>try/except</code> is a language-level mechanism to handle errors (traceback) that may be caused by...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Internal

Overview

try/except is a language-level mechanism to handle errors (traceback) that may be caused by a section of the code. This syntax eliminates tracebacks.

try:
  # do something
except:
  # execute if the previous block caused an error