-
Notifications
You must be signed in to change notification settings - Fork 0
Make new BigDecimal produce better errors #41
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR improves error handling in the BigDecimal constructor to provide more descriptive error messages when parsing invalid input strings.
- Adds validation to catch multiple decimal points in input strings
- Enhances error handling for invalid numeric formats with specific error messages
- Includes comprehensive test coverage for various invalid input scenarios
Reviewed Changes
Copilot reviewed 3 out of 5 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/BigDecimal.ts | Adds validation for multiple decimal points and wraps BigInt conversion in try-catch for better error messages |
| src/BigDecimal.test.ts | Adds new test cases covering various invalid input scenarios including multiple decimals and non-numeric strings |
| src/BigDecimal.test.ts.md | Test snapshots for the new error message validation tests |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 3 out of 5 changed files in this pull request and generated 1 comment.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 3 out of 5 changed files in this pull request and generated 1 comment.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 3 out of 5 changed files in this pull request and generated no new comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
📦 Published PR as canary version:
2.8.0--canary.41.18048226372.0✨ Test out this PR locally via:
npm install @opencreek/ext@2.8.0--canary.41.18048226372.0 # or yarn add @opencreek/ext@2.8.0--canary.41.18048226372.0