优化KV存储数据表关闭后的错误提示

This commit is contained in:
刘祥超
2024-04-07 14:55:12 +08:00
parent 1fe15d4e3c
commit 8d72e5fdd1
5 changed files with 70 additions and 2 deletions

View File

@@ -165,6 +165,10 @@ func (this *Query[T]) FieldOffset(fieldOffset []byte) *Query[T] {
//}
func (this *Query[T]) FindAll(fn IteratorFunc[T]) (err error) {
if this.table != nil && this.table.isClosed {
return NewTableClosedErr(this.table.name)
}
defer func() {
var panicErr = recover()
if panicErr != nil {