fabioz / PyDev.Debugger

Sources for the debugger used in PyDev, PyCharm and VSCode Python
Eclipse Public License 1.0
434 stars 122 forks source link

Change DebuggerInitializationError to subclass Exception #226

Closed mikepqr closed 2 years ago

mikepqr commented 2 years ago

Per PEP8[1] and the Python docs[2], custom exceptions defined in library code should not normally derive from BaseException, which is reserved for exceptions that should not normally be caught (e.g. KeyboardInterrupt, SystemExit). Deriving from BaseException makes it difficult for application code to catch and reraise this exception safely.

[1] https://peps.python.org/pep-0008/#programming-recommendations [2] https://docs.python.org/3/library/exceptions.html#Exception