Skip to content

CI misses errors on event handlers #202

@amirgon

Description

@amirgon

When an error occurs on an event handler, the exception in caught and ignored by the scheduler:
For example:

Traceback (most recent call last):
  File "lv_utils.py", line 117, in task_handler
  File "<string>", line 88, in event_cb
  File "<string>", line 124, in draw
AttributeError: 'module' object has no attribute 'draw_polygon'

To fix this, consider catching exceptions on the event loop task_handler and exit with sys.exit(1) if its available.

def task_handler(self, _):
lv.task_handler()
if self.refresh_cb: self.refresh_cb()
self.scheduled -= 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions