Handling errors¶
Handling errors¶
1def show_last_errors():
2 errors = impact.active_database.errors
3
4 # display all errors
5 for e in errors:
6 impact.gui.output_toolbox.add(e.description)
7
8 # display the last error
9 if errors.count > 0:
10 impact.gui.output_toolbox.add(errors.last.description)
11
12def clear_last_errors():
13 impact.active_database.errors.clear()
14
15
16
17ClearLastErrors()
18
19
20
21if not impact.active_drawing.export("g:\\1.pdf", None, ipFileFormat.ffAdobePDF):
22 ShowLastErrors()