[英]Get error message from a throw error NodeJS
我需要在數據庫中插入一個帶有錯誤的日志錯誤。
mysql.query(sql_log, [sucess], function (err, result) {
if (err){
mysql.rollback(function() {
throw err;
});
}
});
我需要得到err.message
只是console.log(err);
如果條件后。
mysql.query(sql_log, [sucess], function (err, result) {
if (err){
console.log(err);
mysql.rollback(function() {
throw err;
});
}});
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.