UNPKG

738 BJavaScriptView Raw
1'use strict';
2
3function deprecationWarnings(server) {
4 // deprecation for domains and next.ifError
5 if (server.handleUncaughtExceptions === true) {
6 server.log.warn(
7 [
8 'DEPRECATION WARNING: Due to deprecation of the domain module',
9 'in node.js, all features in restify that depend on it have',
10 'been deprecated as well.',
11 'This includes `handleUncaughtExceptions` and',
12 '`next.ifError()`. They will continue to work in 5.x, but',
13 'consider them unsupported and likely to be removed',
14 'from future versions of restify.'
15 ].join(' ')
16 );
17 }
18}
19
20module.exports = deprecationWarnings;