MCPcopy Index your code
hub / github.com/claude-code-best/claude-code / captureException

Function captureException

src/utils/sentry.ts:93–111  ·  view source on GitHub ↗
(
  error: unknown,
  context?: Record<string, unknown>,
)

Source from the content-addressed store, hash-verified

91 * No-op if Sentry has not been initialized.
92 */
93export function captureException(
94 error: unknown,
95 context?: Record<string, unknown>,
96): void {
97 if (!initialized) {
98 return
99 }
100
101 try {
102 Sentry.withScope(scope => {
103 if (context) {
104 scope.setExtras(context)
105 }
106 Sentry.captureException(error)
107 })
108 } catch {
109 // Sentry itself failed — don't let it crash the app
110 }
111}
112
113/**
114 * Set a tag on the current scope for grouping/filtering in Sentry.

Callers 2

componentDidCatchMethod · 0.85
logErrorImplFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected