node-firebird
node-firebird copied to clipboard
.execute(execute procedure xxx) does not return proper error structure
I just tried to test my error handling with the following code:
this.copyProd = function(req, cb) {
ppool.get(function(err, db) {
if (err) {
console.log("Ppool connection error: "+err);
cb(err, null);
return;
}
db.execute("execute procedure SP_COPYPRODUCT(?,?) reere", [req.params.pkey, req.session.ukey],
function (err, result) {
db.detach();
if (err) { console.log(err.message); cb(err,0); } else cb(err, result[0]);
});
});
};
The 'reere' string will generate a -104 exception ("Dynamic SQL Error, SQL error code = -104, Token unknown - line 1, column 39, reere"). The error message is in error.message as usual, but other error structure fields are not set, such as error.sqlcode.
Cheers. Eric.
Hi @ericlovescode, sorry I forgot for your issue. Please try to test now. Thanks.