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 warningsAreFatal parameter #59

Merged
merged 5 commits into from
Nov 6, 2023
Merged

Add warningsAreFatal parameter #59

merged 5 commits into from
Nov 6, 2023

Conversation

Nicogene
Copy link
Member

This flag can toggle the warnings into fatal errors and viceversa

This flag can toggle the warnings into fatal errors and viceversa
@Nicogene Nicogene self-assigned this Oct 31, 2023
@mfussi66
Copy link
Member

mfussi66 commented Oct 31, 2023

I suggest adding a pfcSession::UIShowMessageDialog to show a simple window with an error that the user must click, just like the Simscape Multibody Link. In this way the user is better alerted, and we can tell them to read the warnings in the message window.

@@ -143,7 +150,10 @@ void Creo2Urdf::OnCommand() {
populateExportedFrameInfoMap(component_handle);

idyn_model.addLink(urdf_link_name, link);
addMeshAndExport(component_handle, link_frame_name);
if (!addMeshAndExport(component_handle, link_frame_name) && warningsAreFatal) {
printToMessageWindow("Failed to export mesh for " + link_name, c2uLogLevel::WARN);
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't we also print even if warningsAreFatal is false?

Copy link
Member Author

Choose a reason for hiding this comment

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

You are right, I will make it print anyway

Copy link
Member

@traversaro traversaro left a comment

Choose a reason for hiding this comment

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

Minor comments.

@Nicogene Nicogene merged commit 27e06dd into master Nov 6, 2023
@Nicogene Nicogene deleted the addWariningsAreFatal branch November 6, 2023 14:18
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.

3 participants