Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added exception handling for Xlib.error.BadWindow #97

Merged
merged 1 commit into from
May 13, 2024

Conversation

0xErwin1
Copy link
Contributor

@0xErwin1 0xErwin1 commented Feb 4, 2024

Implemented a try/except block to catch the Xlib.error.BadWindow error during window name and class fetching. This change prevents the appearance of unnecessary messages in the logs, which although they do not affect the performance or operation of the watcher, they generate noise and do not provide relevant information about the error. With this enhancement, in case this error is detected, the window name or class will be set to "unknown", allowing the process to continue without interruption

Implemented a try/except block to catch the `Xlib.error.BadWindow` error during window name and class fetching.
This change prevents the appearance of unnecessary messages in the logs,
which although they do not affect the performance or operation of the watcher,
they generate noise and do not provide relevant information about the error.
With this enhancement, in case this error is detected, the window name or class will be set to "unknown",
allowing the process to continue without interruption
@ErikBjare ErikBjare merged commit 7a89db4 into ActivityWatch:master May 13, 2024
@ErikBjare
Copy link
Member

Nice, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants