batch.go
func (wb *WriteBatch) Error() error {
	wb.Lock()
	defer wb.Unlock()
	return wb.err
}
func (wb *WriteBatch) Error() error {
	wb.Lock()
	defer wb.Unlock()
	return wb.err
}
func ( wb * WriteBatch ) Error ( ) error { wb . Lock ( ) defer wb . Unlock ( ) return wb . err }
// Error returns any errors encountered so far. No commits would be run once an error is detected.
Error returns any errors encountered so far . No commits would be run once an error is detected .