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

Function createFrame

packages/browser/src/stack-parsers.ts:35–51  ·  view source on GitHub ↗
(filename: string, func: string, lineno?: number, colno?: number)

Source from the content-addressed store, hash-verified

33const GECKO_PRIORITY = 50;
34
35function createFrame(filename: string, func: string, lineno?: number, colno?: number): StackFrame {
36 const frame: StackFrame = {
37 filename,
38 function: func === '<anonymous>' ? UNKNOWN_FUNCTION : func,
39 in_app: true, // All browser frames are considered in_app
40 };
41
42 if (lineno !== undefined) {
43 frame.lineno = lineno;
44 }
45
46 if (colno !== undefined) {
47 frame.colno = colno;
48 }
49
50 return frame;
51}
52
53// This regex matches frames that have no function name (ie. are at the top level of a module).
54// For example "at http://localhost:5000//script.js:1:126"

Callers 5

chromeStackParserFnFunction · 0.85
geckoFunction · 0.85
winjsFunction · 0.85
opera10Function · 0.85
opera11Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected