Skip to content

Add check for invalid types in set var action during trace creation - #85

Merged
skuntz merged 1 commit into
obj_tree_develfrom
set_action_mismatch
Jun 5, 2026
Merged

Add check for invalid types in set var action during trace creation#85
skuntz merged 1 commit into
obj_tree_develfrom
set_action_mismatch

Conversation

@skuntz

@skuntz skuntz commented Jun 4, 2026

Copy link
Copy Markdown
Collaborator

Issue: When creating a trace with a set action there was no error checking so any errors would not be caught until the trace action was triggered during execution.

This adds checking at trace creation to print an error and abort trace creation if there is a type mismatch for the set action.

@github-actions

github-actions Bot commented Jun 4, 2026

Copy link
Copy Markdown

CLANG-FORMAT TEST - PASSED

catch ( const std::exception& e ) {
printf("Invalid set var: %s\n", valStr_.c_str());
printf("Invalid set var action: %s\n", valStr_.c_str());
return;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

swap printf for cout?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

IIRC, Scott prefers we use the sst output or printf in "non-debug-console" code. I'm kind of afraid to look at watchpoint, interactive, etc. because I think it's probably a mixed bag.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

sounds like a can of worms best left sealed :)

@donofrio donofrio left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Looks good! definitely adds some additional robustness

@skuntz
skuntz merged commit 4ea2368 into obj_tree_devel Jun 5, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants