Skip to content

Commit

Permalink
chore(n-api): ignore N-API warning mail
Browse files Browse the repository at this point in the history
  • Loading branch information
huangyoukun committed Jun 12, 2018
1 parent 06fa5b4 commit 107e9a0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion bin/proxy/master.js
Expand Up @@ -37,7 +37,12 @@ process.on('warning', function(warning) {
const errStr = warning && warning.stack || String(warning);
const content = `<p><strong>错误堆栈</strong></p><p><pre><code>${errStr}</code></pre></p>`;

logger.error(errStr);
if (warning.message && warning.message.indexOf('N-API') > -1) {
logger.warn(warning.message);
return;
}

logger.warn(errStr);

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

0 comments on commit 107e9a0

Please sign in to comment.