不要怂,就是干,撸起袖子干!

Commit 5f70c51b by Alex Booker

Made unsupported dialect error message clearer.

Closes #4747.
1 parent e548b2cd
...@@ -202,7 +202,7 @@ var Sequelize = function(database, username, password, options) { ...@@ -202,7 +202,7 @@ var Sequelize = function(database, username, password, options) {
} }
this.dialect = new Dialect(this); this.dialect = new Dialect(this);
} catch (err) { } catch (err) {
throw new Error('The dialect ' + this.getDialect() + ' is not supported. ('+err+')'); throw new Error('The dialect ' + this.getDialect() + ' is not supported. Supported dialects: mariadb, mssql, mysql, postgres, and sqlite. ('+err+')');
} }
this.dialect.QueryGenerator.typeValidation = options.typeValidation; this.dialect.QueryGenerator.typeValidation = options.typeValidation;
......
...@@ -57,7 +57,7 @@ describe(Support.getTestDialectTeaser('Configuration'), function() { ...@@ -57,7 +57,7 @@ describe(Support.getTestDialectTeaser('Configuration'), function() {
it('when we don\'t have a valid dialect.', function() { it('when we don\'t have a valid dialect.', function() {
expect(function() { expect(function() {
new Sequelize(config[dialect].database, config[dialect].username, config[dialect].password, {host: '0.0.0.1', port: config[dialect].port, dialect: undefined}); new Sequelize(config[dialect].database, config[dialect].username, config[dialect].password, {host: '0.0.0.1', port: config[dialect].port, dialect: undefined});
}).to.throw(Error, 'The dialect undefined is not supported.'); }).to.throw(Error, 'The dialect undefined is not supported. Supported dialects: mariadb, mssql, mysql, postgres, and sqlite.');
}); });
}); });
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!