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

Wrong error codes #15

Closed
rmdort opened this issue Aug 2, 2020 · 9 comments
Closed

Wrong error codes #15

rmdort opened this issue Aug 2, 2020 · 9 comments
Labels
bug Something isn't working

Comments

@rmdort
Copy link
Contributor

rmdort commented Aug 2, 2020

Some error codes are wrongs

  1. Empty arguments - Expected FormulaError { _error: '#NA!' }
console.log(parser.parse('SUM()', {sheet: 'Sheet 1', row: 1, col: 1}));

Received - Error: Argument type 0 is missing.

  1. Unknown function - Expected FormulaError { _error: '#NAME?' }
console.log(parser.parse('SUMABC()', {sheet: 'Sheet 1', row: 1, col: 1}));

Received Error: Function SUMS is not implemented.

@LesterLyu
Copy link
Owner

I'll look into it.

@rmdort
Copy link
Contributor Author

rmdort commented Aug 2, 2020

Opened a PR to fix this #16

@rmdort
Copy link
Contributor Author

rmdort commented Aug 4, 2020

Noticed that SUM(*() does not throw standard formula error

@LesterLyu
Copy link
Owner

Should be fixed in the new release 👍

@rmdort
Copy link
Contributor Author

rmdort commented Aug 4, 2020

In the new release i get TypeError for SUM(*()

LesterLyu added a commit that referenced this issue Aug 4, 2020
@LesterLyu
Copy link
Owner

@rmdort
Copy link
Contributor Author

rmdort commented Aug 4, 2020

Oh. It was the dependency parser throwing TypeError.

const depParser = new DepParser()
depParser.parse('SUM(*()', { sheet: 'Sheet1', row: 1, col: 1})

@LesterLyu
Copy link
Owner

LesterLyu commented Aug 4, 2020

@rmdort
Copy link
Contributor Author

rmdort commented Aug 4, 2020

Great. thanks

@rmdort rmdort closed this as completed Aug 4, 2020
@LesterLyu LesterLyu added the bug Something isn't working label Aug 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants