-
Notifications
You must be signed in to change notification settings - Fork 61
Proper Error Handling When No Grounded Node Found #1243
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
base: dev
Are you sure you want to change the base?
Conversation
6f2a8a4
to
e0d9dbd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On the new UI it still shows an Exported!
tost even though there was no robot export.
try: | ||
Parser.Parser(exporterOptions).export() | ||
except: | ||
return |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I think you should pass errors back to the web ui (using html_args.returnData
) to avoid showing a success message
bd15709
to
ed338ad
Compare
@@ -221,7 +222,7 @@ def __init__(self, design: adsk.fusion.Design) -> None: | |||
self.grounded = searchForGrounded(design.rootComponent) | |||
|
|||
if self.grounded is None: | |||
message = "These is no grounded component in this assembly, aborting kinematic export." | |||
message = "There is not a grounded component in this assembly, aborting kinematic export." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Personally I feel this message is a bit unclear. Something I believe would help the user more would be to add "Please pin a component."
exporter/SynthesisFusionAddin/src/Parser/SynthesisParser/JointHierarchy.py
Outdated
Show resolved
Hide resolved
…Hierarchy.py Co-authored-by: Dhruv Arora <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think the issue with the export toast was resolved
Task
AARD-1995
Symptom
When exporting is aborted due to there being no grounded node in the assembly (usually because there is no assembly), a traceback appeared and the progress dialogue did not close automatically.
Solution
When the
buildJointPartHierarchy
function catches the raised error fromJointParser.__init__
, it hides the progress dialogue then calls raises another error to abort parsing. Additionally, when runtime exceptions are caught fromParser.export()
in bothConfigCommand.export()
(new UI) andnotify()
(old UI), the parent function returns instead of passing, aborting the export.Verification
Export a blank assembly, observe that no file is saved, the progress dialogue is closed, and no traceback is displayed.
Before merging, ensure the following criteria are met: