0

我需要在我的数据库中插入一个带有错误的日志错误。

mysql.query(sql_log, [sucess], function (err, result) {
     if (err){ 
        mysql.rollback(function() {
           throw err;
        });
      }
});

我需要得到 err.message

4

1 回答 1

0

console.log(err);在 if 条件之后。

mysql.query(sql_log, [sucess], function (err, result) {
 if (err){ 
console.log(err);
    mysql.rollback(function() {
       throw err;
    });
  }});
于 2018-06-08T18:02:55.857 回答