Closed sz332 closed 3 years ago
What really interests me: why did we implement it this way and not with getattr and a default parameter :). Anyhow, this calls for some improvement.
I did a little test, comparing the exception handling vs the getattr function.
Old (exception handling):
ncalls tottime percall cumtime percall filename:lineno(function)
9955 0.007 0.000 0.017 0.000 properties.py:352(_get)
0,017 ÷ 9955 = 0,000001708
New (getattr with default):
ncalls tottime percall cumtime percall filename:lineno(function)
14723 0.010 0.000 0.022 0.000 properties.py:348(_get)
0,022 ÷ 14723 = 0,0000014943
I'll change it to a simple getattr
. That'll do the trick.
Describe the bug
When starting the application in debug mode, creating a new fork node, and enabling stop on uncaught/raised exceptions, a huge amount of exception is caught by VSCode.
To Reproduce
Expected behavior
There should be no uncaught exceptions in the code.
Screenshots
OS
Version
Version of Gaphor: 2.5.1
Additional information
Add any other context about the problem here.