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

Add OpenSim::Component overload to OpenSim::Exception #3987

Merged
merged 5 commits into from
Jan 22, 2025

Conversation

adamkewley
Copy link
Contributor

@adamkewley adamkewley commented Jan 13, 2025

Adds an OpenSim::Component overload to OpenSim::Exception that uses the component's absolute path instead of the component's name.

The utility of doing this is that it's easier to figure out which Component is giving a headache when an OpenSim::Exception is thrown. When it's just the name, it can take a little more effort to figure out where the troublesome component is in the wider component tree (e.g. in a larger model).

Brief summary of changes

  • Adds an OpenSim::Component overload to OpenSim::Exception that prints the absolute path to the component, rather than just the Component's name.
  • Uses the overload in PropertyException, which is a very common exception source when building a model (e.g. when editing XML files or editing models, this exception pops up, and it's useful to know where the errant property is).

Testing I've completed

Looking for feedback on...

CHANGELOG.md (choose one)

  • TODO

This change is Reviewable

@adamkewley
Copy link
Contributor Author

The failures are related to a missing declspec(dllimport) or similar - needs to be fixed

@adamkewley
Copy link
Contributor Author

This should now be ready for review+merging, if it's an agreeable change!

Copy link
Member

@aymanhab aymanhab left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 3 of 5 files at r1, 2 of 2 files at r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @adamkewley)

@adamkewley adamkewley merged commit 1d71712 into main Jan 22, 2025
6 of 7 checks passed
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