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

Optional error message in ValidateXXX functions #135

Open
Yuri05 opened this issue Nov 24, 2023 · 0 comments
Open

Optional error message in ValidateXXX functions #135

Yuri05 opened this issue Nov 24, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@Yuri05
Copy link
Member

Yuri05 commented Nov 24, 2023

At the moment, validate functions do not provide any information about their execution context.
If validation fails, the user just gets an error message "variable XY has wrong length/type/...", e.g.

> validateIsOfLength(appliedCompoundName, 1)
Error in validateIsOfLength(appliedCompoundName, 1) : 
  validateIsOfLength: Object should be of length '1', but is of length '2' instead. 

In order to improve usability, I would extend all these function with additional (optional) string argument - error message, which would be shown to the user instead of (or additionally to?) the current error message.

@Yuri05 Yuri05 added the enhancement New feature or request label Nov 24, 2023
@Yuri05 Yuri05 changed the title Optional error message in ValidateXXX functions Optional error message in ValidateXXX functions Nov 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant