mirror of
https://github.com/claude-code-best/claude-code.git
synced 2026-06-18 06:15:51 +00:00
feat: 更新 sentry 错误上报
This commit is contained in:
@@ -20,6 +20,7 @@ import { logForDebugging } from './debug.js'
|
||||
import { getFsImplementation } from './fsOperations.js'
|
||||
import { attachErrorLogSink, dateToFilename } from './log.js'
|
||||
import { jsonStringify } from './slowOperations.js'
|
||||
import { captureException } from './sentry.js'
|
||||
|
||||
const DATE = dateToFilename(new Date())
|
||||
|
||||
@@ -171,6 +172,9 @@ function logErrorImpl(error: Error): void {
|
||||
appendToLog(getErrorsPath(), {
|
||||
error: `${context}${errorStr}`,
|
||||
})
|
||||
|
||||
// Also report to Sentry (no-op if not initialized)
|
||||
captureException(error)
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user