pygui cleaned up error display by creating top level app methods for displaying exceptions and errors, logging exceptions, and making sure they work for background tasks
This commit is contained in:
parent
0999fabb14
commit
1dd45f4424
14 changed files with 57 additions and 82 deletions
|
@ -2,8 +2,6 @@ import logging
|
|||
import threading
|
||||
from typing import Any, Callable, Tuple
|
||||
|
||||
from core.gui.errors import show_exception
|
||||
|
||||
|
||||
class ProgressTask:
|
||||
def __init__(
|
||||
|
@ -33,7 +31,6 @@ class ProgressTask:
|
|||
self.app.after(0, self.callback, *values)
|
||||
except Exception as e:
|
||||
logging.exception("progress task exception")
|
||||
args = (self.app, "Task Error", e)
|
||||
self.app.after(0, show_exception, *args)
|
||||
self.app.show_exception("Task Error", e)
|
||||
finally:
|
||||
self.app.after(0, self.app.progress_task_complete)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue