MCPcopy Index your code
hub / github.com/brianc/node-postgres / throwError

Function throwError

packages/pg-native/test/many-errors.js:7–22  ·  view source on GitHub ↗
(n, cb)

Source from the content-addressed store, hash-verified

5describe('many errors', function () {
6 it('functions properly without segfault', function (done) {
7 const throwError = function (n, cb) {
8 const client = new Client()
9 client.connectSync()
10
11 const doIt = function (n, cb) {
12 client.query('select asdfiasdf', function (err) {
13 assert(err, 'bad query should emit an error')
14 cb(null)
15 })
16 }
17
18 async.timesSeries(10, doIt, function (err) {
19 if (err) return cb(err)
20 client.end(cb)
21 })
22 }
23
24 async.times(10, throwError, done)
25 })

Callers

nothing calls this directly

Calls 2

endMethod · 0.95
cbFunction · 0.85

Tested by

no test coverage detected