PR-URL: https://github.com/nodejs/io.js/pull/2003
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
// 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;