We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 28ac2a1 commit c9f9cafCopy full SHA for c9f9caf
packages/pg/lib/query.js
@@ -135,7 +135,14 @@ class Query extends EventEmitter {
135
return this.handleError(this._canceledDueToError, con)
136
}
137
if (this.callback) {
138
- this.callback(null, this._results)
+ try {
139
+ this.callback(null, this._results)
140
+ }
141
+ catch(err) {
142
+ process.nextTick(() => {
143
+ throw err
144
+ })
145
146
147
this.emit('end', this._results)
148
0 commit comments