more descriptive invalid buffer error in Grow

This commit is contained in:
vyzo
2021-12-23 22:07:47 +02:00
parent 35f25a934f
commit 76fd5b0e8f

View File

@@ -113,7 +113,7 @@ func (rc *Resources) growBuffer(oldbuf []byte, newsize int) ([]byte, error) {
_, ok := rc.buffers[oldbuf]
if !ok {
return nil, fmt.Errorf("cannot grow unknown buffer")
return nil, fmt.Errorf("invalid buffer; cannot grow buffer not allocated through this scope")
}
newbuf := pool.Get(newsize)