enhance buffer.error