-
Notifications
You must be signed in to change notification settings - Fork 264
Closed
Description
Hi Matthias!
I often use KLayout together with Python (which is a great combination!), but one point that could be improved are the error messages. KLayout prints the error message, but not where it comes from.
I haven't yet been able to figure out in the codebase where the exceptions are being printed. I assume you use a try/except each time you call user code to catch all exceptions and print them as follows:
try:
1/0
except Exception as e:
print(e)
Is this correct?
If you use the traceback module, you can print the exception in the same format as the default handler does:
import traceback
try:
1/0
except Exception:
traceback.print_exc()
Maybe this could be used in KLayout?
Leo
Reactions are currently unavailable