Passing an invalid flag to an operation throws a very uninformative bad argument #1 to 'band' (number expected, got nil) error. This PR checks for invalid flags and throws a much cleaner error, detailing the name of the invalid flag. As an example, calling flatten with "nonsense" as a flag would result in unable to call operation flatten: invalid flag 'nonsense'.
Passing an invalid flag to an operation throws a very uninformative
bad argument #1 to 'band' (number expected, got nil)
error. This PR checks for invalid flags and throws a much cleaner error, detailing the name of the invalid flag. As an example, callingflatten
with"nonsense"
as a flag would result inunable to call operation flatten: invalid flag 'nonsense'
.