sequelize/sequelize — pull request #1971 by bromanko (2014-06-26 21:43:46+00:00)
Title: Sequelize errors now capture stack and messages properly

Previously, error messages and stack traces were lost when throwing a custom Sequelize error. This corrects that.

For more details:
http://dailyjs.com/2014/01/30/exception-error/
http://stackoverflow.com/questions/1382107/whats-a-good-way-to-extend-error-in-javascript