diff --git a/lib/internal/buffer_new.js b/lib/internal/buffer_new.js index 4bbb1a57a039b5..3b3a2006146663 100644 --- a/lib/internal/buffer_new.js +++ b/lib/internal/buffer_new.js @@ -457,16 +457,7 @@ Buffer.prototype.write = function(string, offset, length, encoding) { // XXX legacy write(string, encoding, offset, length) - remove in v0.13 } else { - if (!writeWarned) { - if (process.throwDeprecation) - throw new Error(writeMsg); - else if (process.traceDeprecation) - console.trace(writeMsg); - else - console.error(writeMsg); - writeWarned = true; - } - + writeWarned = internalUtil.printDeprecationMessage(writeMsg, writeWarned); var swap = encoding; encoding = offset; offset = length >>> 0;