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

Add validate input option #128

Open
rom1504 opened this issue Aug 12, 2021 · 2 comments
Open

Add validate input option #128

rom1504 opened this issue Aug 12, 2021 · 2 comments

Comments

@rom1504
Copy link
Member

rom1504 commented Aug 12, 2021

Can be implemented by having a validate function for each datatype

useful to debug calls to write

should be optional to avoid perf issues

examples:

  • i8 : check whether input is between -128 and 127
  • container : check all fields are present and no additional, check all subtypes
@Saiv46
Copy link
Contributor

Saiv46 commented Sep 21, 2021

i8 : check whether input is between -128 and 127

Btw, all numeric types (except u64) already do validate input.

Maybe add PROTODEF_DEBUG environment variable for interpreter?

@loveGhb
Copy link

loveGhb commented Oct 27, 2021

Hi, how can I fix this for myself? What should be checked and where?

RangeError [ERR_OUT_OF_RANGE]: Write error for undefined : The value of "value" is out of range. It must be >= -128 and <= 127. Received 129

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants