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