File: pyedit-products/unzipped/docetc/examples/RunCode-examples/errors-runtime.py

# Verify that errors (stderr) show up in the Capture output window.
# Runtime erros errors include a full traceback, but not lines related to proxy.
# Runtime errors occur as code is run, so prior print() output does appear.

print('runtime error follows...')   # <= does show up (as expected)
x = 1 + nonesuch


# expected result in Capture window:
"""
runtime error follows...
Traceback (most recent call last):
  File "C:\MY-STUFF\Code\pymailgui\PyMailGui-PP4E\PP4E\Gui\TextEditor\docetc\RunCode-examples\errors-runtime.py", line 6, in <module>
    x = 1 + nonesuch
NameError: name 'nonesuch' is not defined
[EOF]
"""



[Home page] Books Code Blog Python Author Train Find ©M.Lutz