(error)
| 322 | |
| 323 | writev(chunks, callback) { |
| 324 | function done(error) { |
| 325 | try { |
| 326 | callback(error); |
| 327 | } catch (error) { |
| 328 | // In a next tick because this is happening within |
| 329 | // a promise context, and if there are any errors |
| 330 | // thrown we don't want those to cause an unhandled |
| 331 | // rejection. Let's just escape the promise and |
| 332 | // handle it separately. |
| 333 | process.nextTick(() => destroy(writable, error)); |
| 334 | } |
| 335 | } |
| 336 | |
| 337 | PromisePrototypeThen( |
| 338 | writer.ready, |