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 warnings or errors for numbers that are going to break #11

Open
danprince opened this issue Aug 11, 2015 · 1 comment
Open

Add warnings or errors for numbers that are going to break #11

danprince opened this issue Aug 11, 2015 · 1 comment
Labels

Comments

@danprince
Copy link
Owner

Because Javascript doesn't support bitwise operations on numbers > 32 bit integers, we need to provide some kind of heads up when someone creates a format with a field length that will break.

If someone tries to create a field that's not a number, is a floating point number, or is an integer bigger than we can manipulate with a bitwise operators, then throw some pretty liberal errors. As long as this stuff lives within the constructor, it should be fine.

If you can think of any other edge cases that could also be troublesome, leave a comment here or send a PR.

@danprince danprince added the bug label Aug 11, 2015
@austinliou
Copy link

Additionally, should pack() give warnings/throw errors if supplied invalid input? For example: input exceeding field range, input NaN/noninteger, input count does not match field count, etc?

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

No branches or pull requests

2 participants