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

exit on bad geometry #256

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

dacyberduck
Copy link

@dacyberduck dacyberduck commented Mar 5, 2024

When geometry argument received is invalid, prevent wf-recorder from recording rather than setting geometry to default '0,0 0x0' and continue recording.

when geometry argument received is invalid, prevent wf-recorder
from recording rather than setting geometry to 0,0 0x0
@soreau
Copy link
Collaborator

soreau commented Mar 5, 2024

Maybe have the output message suggest that the geometry might need to be in quotation marks, too?

@dacyberduck
Copy link
Author

Maybe have the output message suggest that the geometry might need to be in quotation marks, too?

That is already mentioned in the documentation as well as '--help' text. Adding something like 'see: wf-recorder --help' to the message should suffice.

@soreau
Copy link
Collaborator

soreau commented Mar 6, 2024

Maybe wf-recorder --help | grep geometry or even more direct: Bad value of geometry: %s\nDid you forget to wrap it in quotation marks?

@dacyberduck
Copy link
Author

Maybe wf-recorder --help | grep geometry or even more direct: Bad value of geometry: %s\nDid you forget to wrap it in quotation marks?

Well, we can't simply assume that the value is wrong only because it is not properly quoted. Maybe the user has given a completely wrong data that doesn't represent any geometry.

@soreau
Copy link
Collaborator

soreau commented Mar 6, 2024

The reason I suggest the message suggestion is because 1) the number one reason this happens is because people forget the quotations and 2) a message telling people to look at --help output isn't very useful when it's not clearly spelled out that quotations are needed there. Maybe we could combine the ideas and suggest both --help and ask if the argument is not quoted?

Copy link
Owner

@ammen99 ammen99 left a comment

Choose a reason for hiding this comment

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

I agree with @soreau, it would be nice to directly print an example of how to set the geometry and say it should be quoted.

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