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

Detect cyclic parent-child relationships #2862

Merged
merged 2 commits into from Mar 14, 2023
Merged

Detect cyclic parent-child relationships #2862

merged 2 commits into from Mar 14, 2023

Conversation

wmww
Copy link
Contributor

@wmww wmww commented Mar 9, 2023

Required to pass the new WLCS tests added by canonical/wlcs#277

{
if (window_info.window() == ancestor)
{
BOOST_THROW_EXCEPTION(std::logic_error("cyclic parent-child relationship detected"));
Copy link
Contributor

Choose a reason for hiding this comment

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

Is the error case detected an error in Mir's logic? Or a problem with the runtime behaviour of a client?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It detects a possible error in client logic

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
BOOST_THROW_EXCEPTION(std::logic_error("cyclic parent-child relationship detected"));
BOOST_THROW_EXCEPTION(std::runtime_error("cyclic parent-child relationship detected"));

Copy link
Contributor

@AlanGriffiths AlanGriffiths left a comment

Choose a reason for hiding this comment

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

bors merge

@bors bors bot merged commit 8a5cc78 into main Mar 14, 2023
@bors bors bot deleted the cyclic-parents branch March 14, 2023 11:53
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.

None yet

2 participants