MCPcopy
hub / github.com/compiler-explorer/compiler-explorer / SentryCapture

Function SentryCapture

static/sentry.ts:153–172  ·  view source on GitHub ↗
(value: unknown, context?: string)

Source from the content-addressed store, hash-verified

151}
152
153export function SentryCapture(value: unknown, context?: string) {
154 if (value instanceof Error) {
155 if (context) {
156 value.message += `\nSentryCapture Context: ${context}`;
157 }
158 Sentry.captureException(value);
159 } else {
160 const e = new Error();
161 const trace = parse(e);
162 Sentry.captureMessage(
163 'Non-Error capture:\n' +
164 (context ? `Context: ${context}\n` : '') +
165 `Data:\n${JSON.stringify(value)}\n` +
166 'Trace:\n' +
167 trace
168 .map(frame => `${frame.functionName} ${frame.fileName}:${frame.lineNumber}:${frame.columnNumber}`)
169 .join('\n'),
170 );
171 }
172}

Callers 15

unsubscribeMethod · 0.70
SetupSentryFunction · 0.70
validateComponentStateFunction · 0.70
setupButtonsFunction · 0.70
startFunction · 0.70
initFullCallbacksMethod · 0.70
updatePermaLinkMethod · 0.70
getLinkOfTypeMethod · 0.70
postInitMethod · 0.50
showStackUsageResultsMethod · 0.50

Calls 1

parseFunction · 0.50

Tested by

no test coverage detected