Skip to content

Commit

Permalink
Track debugInfo on module state instead of stack
Browse files Browse the repository at this point in the history
Notably with DON'T use try/finally because if something throws we want
to observe what it was at the time we threw.

Now we can use this when we create the Throw Fiber to associate the
Server Components that were part of the parent stack before this error
threw.
  • Loading branch information
sebmarkbage committed Jun 7, 2024
1 parent 52ca1a9 commit 1df6d56
Show file tree
Hide file tree
Showing 2 changed files with 126 additions and 124 deletions.
6 changes: 4 additions & 2 deletions packages/react-client/src/__tests__/ReactFlight-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1050,8 +1050,10 @@ describe('ReactFlight', () => {
}

const expectedStack = __DEV__
? // TODO: This should include Throw but it doesn't have a Fiber.
'\n in div' + '\n in ErrorBoundary (at **)' + '\n in App'
? '\n in Throw' +
'\n in div' +
'\n in ErrorBoundary (at **)' +
'\n in App'
: '\n in div' + '\n in ErrorBoundary (at **)';

function App() {
Expand Down
Loading

0 comments on commit 1df6d56

Please sign in to comment.