Skip to content

Commit f35a69e

Browse files
committed
drop es6-promise and return better error message for users
1 parent a454eda commit f35a69e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

promise.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,12 @@ PromiseConnection.prototype.prepare = function () {
168168

169169
function createPool (opts) {
170170
var corePool = core.createPool(opts);
171-
var Promise = opts.Promise || global.Promise || require('bluebird');
171+
var Promise = opts.Promise || global.Promise;
172+
if (!Promise) {
173+
throw new Error('no Promise implementation available.' +
174+
'Use promise-enabled node version or pass userland Promise' +
175+
' implementation as parameter, for example: { Promise: require(\'bluebird\') }');
176+
}
172177

173178
var promisePool = {
174179
getConnection: function () {

0 commit comments

Comments
 (0)