-
Notifications
You must be signed in to change notification settings - Fork 0
Remove Runtime Exceptions #121
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
Test Results 1 files ± 0 1 suites ±0 6m 53s ⏱️ + 4m 2s Results for commit 90615c1. ± Comparison against base commit 1a2b998. This pull request removes 2 and adds 33 tests. Note that renamed tests count towards both.♻️ This comment has been updated with latest results. |
22da9a0 to
e0c84f6
Compare
7fe9fba to
aa0eb8a
Compare
|
Outside of constructors there are 4 calls to |
69a7acc to
223d3cd
Compare
223d3cd to
fded898
Compare
2fe6c66 to
812f9a7
Compare
0a2d79c to
5a110e0
Compare
|
Looks good! We could probably improve performance even more by moving from result callbacks to coroutines. Should I create a ticket for this? |
c81bb65 to
368badb
Compare
This PR is being reviewed by Cursor BugbotDetailsYour team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team. To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial. |
a09ad91 to
a6bba7b
Compare
5813c2c to
e39cb9d
Compare
96dc420 to
1d2ddae
Compare
|
Looks like a release 🥳 Might we think about doing this? |
|
I've added the gcovr option See: https://gcovr.com/en/stable/manpage.html#cmdoption-gcovr-exclude-lines-by-pattern |
822cd59 to
f597714
Compare
They never help but confuse.
|
|
josephbirkner
left a comment
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.
🍰



It is still easy to accidentally "crash" the WASM runtime with queries – so let's replace runtime exceptions with
tl::expected.Missing:
On
main:This branch:
Note
Switches the engine from throwing exceptions to returning errors via tl::expected across expressions, functions, model/value, I/O, and tooling, updating APIs and tests accordingly.
tl::expectedthroughout (Expr::eval/ieval,Function::eval,ResultFn,MetaType, operators dispatch, etc.).simfil::Error::Typeand add equality forError/SourceLocation.tl::expected<Result, Error>; propagate errors and remove exception-based control flow (e.g., division by zero ->Error::DivisionByZero).expected; argument parsing reworked to validate/count/type-check viaArgParserwithout throwing.Valueto carryModelNode::Ptrin its variant; add helpers (nodePtr,node,asBool).Model/ModelPoolAPIs (resolve, root, validate, read/write, setStrings) now returnexpected; error messages standardized.StringPool::emplace/read/writereturnexpected; handle pool overflow asError.json::parseand internal build useexpected; Bitsery traits handle arena access errors.ArrayArena::atnow returnsexpected<reference_wrapper<...>, Error>; iterator deref asserts; out-of-range returnsError::IndexOutOfRange.expected(root/eval/parse) and print errors instead of throwing.expectedresults and new error cases; add performance/diagnostics tweaks.Written by Cursor Bugbot for commit f1a26a5. This will update automatically on new commits. Configure here.