MCPcopy Index your code
hub / github.com/simstudioai/sim / formatException

Function formatException

apps/sim/connectors/sentry/sentry.ts:277–293  ·  view source on GitHub ↗

* Renders the exception entry of a latest event into readable lines: each exception's * type/value plus a compact, top-down stack frame list.

(data: SentryExceptionData)

Source from the content-addressed store, hash-verified

275 * type/value plus a compact, top-down stack frame list.
276 */
277function formatException(data: SentryExceptionData): string[] {
278 const lines: string[] = []
279
280 for (const value of data.values ?? []) {
281 const header = [value.type, value.value].filter(Boolean).join(': ')
282 if (header) lines.push(header)
283
284 const frames = value.stacktrace?.frames ?? []
285 for (const frame of frames.slice().reverse()) {
286 const location = [frame.module || frame.filename, frame.function].filter(Boolean).join(' in ')
287 const lineNo = frame.lineNo != null ? `:${frame.lineNo}` : ''
288 if (location) lines.push(` at ${location}${lineNo}`)
289 }
290 }
291
292 return lines
293}
294
295/**
296 * Formats an issue and its latest event into a single plain-text document covering the

Callers 1

formatIssueContentFunction · 0.85

Calls 2

joinMethod · 0.80
pushMethod · 0.45

Tested by

no test coverage detected