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

log messages before asserting in DAO classes. #4903

Merged
merged 2 commits into from
Aug 22, 2022

Conversation

daschuer
Copy link
Member

This was helpful during debugging a DB issue.

Copy link
Member

@Holzhaus Holzhaus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a suggestion to improve terminal output on assertion fails.

qWarning() << "No valid key detected in analyzed window:" << iKey;
DEBUG_ASSERT(false);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know that you log a message immediate before this assertion, but maybe the order becomes confusing due to logging from multiple threads or something.

I suggest that you put a message into the assertion like this:

Suggested change
DEBUG_ASSERT(false);
DEBUG_ASSERT(!"chromatic key is invalid");

Copy link
Member

@Holzhaus Holzhaus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm

@Holzhaus
Copy link
Member

Waiting for CI.

@Holzhaus Holzhaus merged commit 074c938 into mixxxdj:main Aug 22, 2022
@Holzhaus
Copy link
Member

Thanks.

@daschuer daschuer deleted the dao_assert branch October 12, 2022 12:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants