Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: solve the problem of large JSON parsing errors for object and array types. #290

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

straiway
Copy link

solve the issue of: #289

fix: solve the problem of large JSON parsing errors for object and array types.
- 在多个文件中添加了 recover 函数,用于捕获和记录异常信息- 异常发生时,会打印错误信息和调用栈信息到日志
- 优化了部分错误处理逻辑,提高了系统的健壮性和可维护性
- 修改了错误处理逻辑,当 Prepare 语句出错时,现在会设置 this.err 并返回空结果
- 调整了 defer 语句的位置,确保 stmt.Close()总是被调用,避免资源泄漏
- 增加对 driver.ErrBadConn 错误的特殊处理
- 对于连接错误,只打印错误信息,不打印堆栈跟踪
- 其他错误情况保持原有日志输出
- 在 clickhouse.go 中添加对 This.err 的非空检查,避免在连接为空时继续执行
- 将 This.err 更改为 This.conn.err,以正确检查连接错误
- 优化了错误处理逻辑,确保在连接出错时及时返回
- 修改了 log.Printf 的格式,使用 %+v 以获取更详细的结构体信息
- 增加了 This.conn 的日志输出,以便于进一步调试和分析问题
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant