From e5ada116cd59e7ab10c9e697736bdc5ea37e0ce9 Mon Sep 17 00:00:00 2001 From: Trevor Norris Date: Wed, 17 Jun 2015 11:42:00 -0600 Subject: [PATCH] buffer: minor cleanup from rebase PR-URL: https://github.com/nodejs/io.js/pull/2003 Reviewed-By: Chris Dickinson --- lib/internal/buffer_new.js | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/lib/internal/buffer_new.js b/lib/internal/buffer_new.js index 4bbb1a57a0..3b3a200614 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;