Skip to content

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

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from

Conversation

azaleacolburn
Copy link
Contributor

@azaleacolburn azaleacolburn commented Jul 29, 2025

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 from JointParser.__init__, it hides the progress dialogue then calls raises another error to abort parsing. Additionally, when runtime exceptions are caught from Parser.export() in both ConfigCommand.export() (new UI) and notify() (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:

  • All acceptance criteria outlined in the ticket are met.
  • Necessary test cases have been added and updated.
  • A feature toggle or safe disable path has been added (if applicable).
  • User-facing polish:
    • Ask: "Is this ready-looking?"
  • Cross-linking between Jira and GitHub:
    • PR links to the relevant Jira issue.
    • Jira ticket has a comment referencing this PR.

@azaleacolburn azaleacolburn force-pushed the colbura/1995/no-grounded-traceback branch from 6f2a8a4 to e0d9dbd Compare July 29, 2025 16:43
@azaleacolburn azaleacolburn marked this pull request as ready for review July 29, 2025 18:59
@azaleacolburn azaleacolburn requested review from a team as code owners July 29, 2025 18:59
@BrandonPacewic BrandonPacewic requested a review from rutmanz July 29, 2025 22:15
Copy link
Member

@BrandonPacewic BrandonPacewic left a 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
Copy link
Member

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

@azaleacolburn azaleacolburn force-pushed the colbura/1995/no-grounded-traceback branch from bd15709 to ed338ad Compare August 5, 2025 21:10
@@ -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."
Copy link
Collaborator

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."

Copy link
Member

@rutmanz rutmanz left a 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

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.

4 participants