Commit 2cf5e0f
authored
[error] Remove redundant
This PR refactors Decimo’s error-handling to raise the library’s typed
`DecimoError[...]` aliases directly (e.g., `ValueError`,
`OverflowError`) instead of wrapping them in `Error(...)`, introduces a
`RuntimeError` type, and updates call sites/tests accordingly.
**Changes:**
- Remove redundant `Error(...)` wrappers across TOML parsing, numeric
parsing, and arithmetic modules.
- Add `RuntimeError` as a `DecimoError[...]` alias and update
runtime-infrastructure failure sites (e.g., MPFR
availability/allocation).
- Replace uses of the generic `DecimoError` wrapper with more specific
error types (and update tests to match).Error wrappers + Add RuntimeError type + Replace DecimoError with specific error types (#198)1 parent 78b0c9c commit 2cf5e0f
File tree
25 files changed
+858
-1352
lines changed- docs/plans
- src/decimo
- bigdecimal
- bigfloat
- bigint10
- bigint
- biguint
- decimal128
- toml
25 files changed
+858
-1352
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1321 | 1321 | | |
1322 | 1322 | | |
1323 | 1323 | | |
1324 | | - | |
| 1324 | + | |
1325 | 1325 | | |
1326 | 1326 | | |
1327 | 1327 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
320 | 320 | | |
321 | 321 | | |
322 | 322 | | |
323 | | - | |
324 | | - | |
325 | | - | |
326 | | - | |
327 | | - | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
328 | 326 | | |
329 | 327 | | |
330 | 328 | | |
| |||
698 | 696 | | |
699 | 697 | | |
700 | 698 | | |
701 | | - | |
702 | | - | |
703 | | - | |
704 | | - | |
705 | | - | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
706 | 702 | | |
707 | 703 | | |
708 | 704 | | |
| |||
916 | 912 | | |
917 | 913 | | |
918 | 914 | | |
919 | | - | |
920 | | - | |
921 | | - | |
922 | | - | |
923 | | - | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
924 | 918 | | |
925 | 919 | | |
926 | 920 | | |
| |||
961 | 955 | | |
962 | 956 | | |
963 | 957 | | |
964 | | - | |
965 | | - | |
966 | | - | |
967 | | - | |
968 | | - | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
969 | 961 | | |
970 | 962 | | |
971 | 963 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
362 | 362 | | |
363 | 363 | | |
364 | 364 | | |
365 | | - | |
366 | | - | |
367 | | - | |
368 | | - | |
369 | | - | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
370 | 368 | | |
371 | 369 | | |
372 | 370 | | |
373 | 371 | | |
374 | 372 | | |
375 | | - | |
376 | | - | |
377 | | - | |
378 | | - | |
379 | | - | |
380 | | - | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
381 | 377 | | |
382 | 378 | | |
383 | 379 | | |
| |||
544 | 540 | | |
545 | 541 | | |
546 | 542 | | |
547 | | - | |
548 | | - | |
549 | | - | |
550 | | - | |
551 | | - | |
552 | | - | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
553 | 547 | | |
554 | 548 | | |
555 | 549 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
| 168 | + | |
| 169 | + | |
172 | 170 | | |
173 | 171 | | |
174 | 172 | | |
| |||
0 commit comments