Repository navigation
feat: tell if each thrown exception was caught - #129
Merged
Merged
Conversation
8 of 11 tasks
lukecotter
force-pushed
the
feat/exception-caught
branch
from
October 10, 2026 12:00
dcc5b64 to
de5fc2f
Compare
3 of 11 tasks
lcottercertinia
added a commit
that referenced
this pull request
Oct 15, 2026
## 📝 Overview v1: the new parser becomes the package root, and the legacy parser is removed. This PR is stacked on #124. It merges after the v0.3 release. ## 🛠️ Changes - Remove the legacy parser, its tests and the legacy side of the compare tool. - Move `src/next` to `src/`. The exports are now `.` (node build for the `node` condition, else browser) and `./worker`. `./next` and `./next/worker` are removed. - Record the legacy parser's `bench:large` figures as the baseline (`benchmarks/baselines/legacy-v0.3.json`). - Remove every comment that describes a rule against the legacy parser. - Rewrite the README, AGENTS.md and CONTRIBUTING.md for v1. - Add a major changeset with the full list of breaking changes. Performance against v0.3, on logs of 8 to 100 MB: 5–8× faster, with 6× less memory. A 100 MB log parses in 182 ms instead of 1,215 ms, and holds 141 MB instead of 812 MB. Consumer check: debug-log-analyzer migrated locally (2548/2548 tests, build), and checked by hand in the Extension Development Host. A 100 MB log parses in about 220 ms in the webview. ## 🧩 Type of change - [ ] 🐛 Bug fix — fixes an issue - [x] ✨ Feature — adds new functionality - [ ] ♻️ Refactor — no behaviour change - [x] ⚡ Performance - [x] 📝 Docs - [ ] 🔧 Chore — tooling, CI, deps - [x] 💥 Breaking change ## 🔗 Related issues Stacked on #124. Closes #34: `ofType` gives typed per-type indexes, and `events` an iterative walk of every event. Closes #35: every type has a `kind`, and SOSL has its own kind apart from SOQL. Closes #37: the new parser is the package root, and the legacy parser is removed. Closes #71: the catalog names every event's fields, and `EventFields` documents each one. Closes #123: `details.caught` on each throw (#129), and `flowErrors` with the `FLOW_ELEMENT_ERROR` text change (#128). Both merge into this branch first. Closes #127: `DEBUG_CATEGORY_TOKEN` is exported from the package root. ## ✅ Checklist - [x] Tests added/updated - [x] `pnpm run ci` passes locally - [x] Changeset added (`pnpm changeset`) if this affects the published package - [x] Docs updated if behaviour or the public API changed --------- Co-authored-by: Luke Cotter <81575432+lcottercertinia@users.noreply.github.com>
lukecotter
force-pushed
the
feat/exception-caught
branch
from
October 15, 2026 16:59
f265c8e to
af4eb5c
Compare
lukecotter
force-pushed
the
feat/exception-caught
branch
from
October 15, 2026 17:23
af4eb5c to
c316b67
Compare
lcottercertinia
previously approved these changes
Oct 15, 2026
lukecotter
force-pushed
the
feat/exception-caught
branch
from
October 15, 2026 18:33
c316b67 to
7e1eb5f
Compare
lcottercertinia
marked this pull request as ready for review
October 15, 2026 22:17
lukecotter
force-pushed
the
feat/exception-caught
branch
2 times, most recently
from
October 16, 2026 08:55
39c17d5 to
5ca83c1
Compare
Add `isCaught` to the details of each `EXCEPTION_THROWN` event. It is the parser's reading of the row after the throw; the log does not state it. A `FATAL_ERROR` gives false, any other row gives true, so a `finally` block that logs before a `FATAL_ERROR` reads true. Throws with only exit lines between them share one answer, so a throw that a catch block wraps and throws again is false too. The log end, a limit block (including `TESTING_LIMITS`) or dropped lines give null. engine/throws.ts reads the outcome of every decided throw in one pass, on the first read, and EventLines holds the result for its log. The scan does not change. A max-size issue that moves to a closed frame now keeps where the dropped part starts, so a throw before a max-size cut reads null. Refs #123
lukecotter
force-pushed
the
feat/exception-caught
branch
from
October 16, 2026 08:58
5ca83c1 to
bea7ec5
Compare
lcottercertinia
approved these changes
Oct 16, 2026
lcottercertinia
approved these changes
Oct 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📝 Overview
Tell if each thrown exception was caught. A consumer that reports what failed in a transaction needs this fact. Today it must read it off the raw events itself.
🛠️ Changes
isCaught: boolean | nullto the details of eachEXCEPTION_THROWNevent. It is the parser's reading of the row after the throw; the log does not state it.FATAL_ERRORgivesfalse. Any other row givestrue, so afinallyblock that logs before aFATAL_ERRORreadstrue.falsetoo.CUMULATIVE_LIMIT_USAGE,LIMIT_USAGE_FOR_NS,TESTING_LIMITS,CUMULATIVE_PROFILING_BEGIN) or dropped lines givenull.engine/throws.tsreads every decided throw in one pass, on the first read.EventLinesholds the result for its log. The scan does not change.Issues.replace). Without it, a throw before a max-size cut readtrue.CONTEXT.md. The README and.changeset/v1.mdsay whatdetailsholds.🧩 Type of change
🔗 Related issues
Part of #123 (caught).
✅ Checklist
pnpm run cipasses locallypnpm changeset) if this affects the published package