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

Function SentryCapture

lib/sentry.ts:64–83  ·  view source on GitHub ↗
(value: unknown, context?: string)

Source from the content-addressed store, hash-verified

62}
63
64export function SentryCapture(value: unknown, context?: string) {
65 if (value instanceof Error) {
66 if (context) {
67 value.message += `\nSentryCapture Context: ${context}`;
68 }
69 Sentry.captureException(value);
70 } else {
71 const e = new Error();
72 const trace = parse(e);
73 Sentry.captureMessage(
74 'Non-Error capture:\n' +
75 (context ? `Context: ${context}\n` : '') +
76 `Data:\n${JSON.stringify(value)}\n` +
77 'Trace:\n' +
78 trace
79 .map(frame => `${frame.functionName} ${frame.fileName}:${frame.lineNumber}:${frame.columnNumber}`)
80 .join('\n'),
81 );
82 }
83}

Callers 9

constructorMethod · 0.50
doCompilationWorkFunction · 0.50
storedCodeHandlerMethod · 0.50
constructorMethod · 0.50
handleMethod · 0.50
shortlinkInfoHandlerMethod · 0.50
healthcheckMethod · 0.50
makeLlvmEdgesMethod · 0.50

Calls 1

parseFunction · 0.70

Tested by

no test coverage detected