(x)
| 28 | } |
| 29 | |
| 30 | function postgres(x) { |
| 31 | const error = new PostgresError(x) |
| 32 | Error.captureStackTrace(error, postgres) |
| 33 | return error |
| 34 | } |
| 35 | |
| 36 | function generic(code, message) { |
| 37 | const error = Object.assign(new Error(code + ': ' + message), { code }) |