MCPcopy Index your code
hub / github.com/getsentry/sentry-javascript / getPopFirstTopFrames

Function getPopFirstTopFrames

packages/browser/src/eventbuilder.ts:155–161  ·  view source on GitHub ↗

* If error has `framesToPop` property, it means that the * creator tells us the first x frames will be useless * and should be discarded. Typically error from wrapper function * which don't point to the actual location in the developer's code. * * Example: https://github.com/zertosh/invariant/b

(ex: Error & { framesToPop?: unknown })

Source from the content-addressed store, hash-verified

153 * Example: https://github.com/zertosh/invariant/blob/master/invariant.js#L46
154 */
155function getPopFirstTopFrames(ex: Error & { framesToPop?: unknown }): number {
156 if (typeof ex.framesToPop === 'number') {
157 return ex.framesToPop;
158 }
159
160 return 0;
161}
162
163// https://developer.mozilla.org/en-US/docs/WebAssembly/JavaScript_interface/Exception
164// @ts-expect-error - WebAssembly.Exception is a valid class

Callers 1

parseStackFramesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected