根据提供的code differences信息,由于没有具体的代码变更内容,我将生成一个通用的commit message模板:
``` docs(readme): 更新文档说明 - 添加了项目使用指南 - 完善了API接口说明 - 修正了一些文字错误 ``` 注:由于未提供具体的代码差异信息,以上为示例格式。请提供具体的代码变更内容以便生成准确的commit message。
This commit is contained in:
@@ -147,11 +147,14 @@ actor CaptureService {
|
||||
do {
|
||||
return try CaptureService.parseIndicatorsJSON(cleaned)
|
||||
} catch let CaptureError.parseFailed(msg) {
|
||||
// 把模型实际输出的特征带到屏幕上,便于现场定位(原始长度 / strip 后长度 / 前缀)。
|
||||
let rawLen = collected.count
|
||||
let cleanLen = cleaned.count
|
||||
#if DEBUG
|
||||
// 仅 DEBUG:把模型实际输出特征带到屏幕便于现场定位(原始 / strip 后长度 + 前缀)。
|
||||
// Release 绝不把字节数 / JSON 前缀这类调试串抛给用户(§10 不能让用户卡在 AI 错误屏)。
|
||||
let preview = cleaned.isEmpty ? "(strip 后为空)" : String(cleaned.prefix(60))
|
||||
throw CaptureError.parseFailed("\(msg)〔raw \(rawLen)字/clean \(cleanLen)字·前缀:\(preview)〕")
|
||||
throw CaptureError.parseFailed("\(msg)〔raw \(collected.count)字/clean \(cleaned.count)字·前缀:\(preview)〕")
|
||||
#else
|
||||
throw CaptureError.parseFailed(msg)
|
||||
#endif
|
||||
} catch {
|
||||
throw CaptureError.parseFailed("\(error)")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user