mirror of
https://github.com/knex/knex.git
synced 2025-12-27 23:18:41 +00:00
error changes as noted in #39
This commit is contained in:
parent
9182966458
commit
6acce4499f
@ -57,10 +57,10 @@ var ServerBase = ClientBase.extend({
|
||||
});
|
||||
}
|
||||
|
||||
return chain.then(builder.handleResponse).otherwise(function(e) {
|
||||
var err = new Error(e.toString() + ' - ' + '{sql: ' + sql + ', bindings: ' + bindings + '}');
|
||||
err.originalStack = e.stack;
|
||||
throw err;
|
||||
return chain.then(builder.handleResponse).otherwise(function(error) {
|
||||
var newError = new Error('{message: ' + error.message + ', sql: ' + sql + ', bindings: ' + bindings + '}');
|
||||
newError.clientError = error;
|
||||
throw newError;
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user