feat(store): use custom error for deleteCount overflow#3611
feat(store): use custom error for deleteCount overflow#3611dk1a wants to merge 3 commits intolatticexyz:mainfrom
Conversation
|
|
ooc is this similar to #3521 ? |
|
The arithemetic error I replace with a custom error comes from the definition of (edited after realizing it's even less related than I initially thought, in case you read the previous version) |
Calling
_spliceDynamicDatawith an overflowingdeleteCount, it triggers a default arithmetic errorIf it instead triggered
Store_InvalidSplice, it would've saved me a couple hours of debuggingI also add tests, for this new behaviour and for the previous way
Store_InvalidSplicewas usedMy used of
uncheckedisn't important and I can remove it if you don't like itI assume this is also blocked by audit, so I'm stockpiling PRs for whenever that happens
note to self about updating store logs:
pnpm with-anvil vitest --update --hookTimeout=1000000