Skip to content

Commit 107e9a0

Browse files
committed
chore(n-api): ignore N-API warning mail
1 parent 06fa5b4 commit 107e9a0

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

bin/proxy/master.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,12 @@ process.on('warning', function(warning) {
3737
const errStr = warning && warning.stack || String(warning);
3838
const content = `<p><strong>错误堆栈</strong></p><p><pre><code>${errStr}</code></pre></p>`;
3939

40-
logger.error(errStr);
40+
if (warning.message && warning.message.indexOf('N-API') > -1) {
41+
logger.warn(warning.message);
42+
return;
43+
}
44+
45+
logger.warn(errStr);
4146

4247
setImmediate(function() {
4348
require('util/mail/mail.js').SendMail(key, 'js', 600, {

0 commit comments

Comments
 (0)