base-error.js 546 B

1234567891011121314151617
  1. 'use strict';
  2. /**
  3. * Sequelize provides a host of custom error classes, to allow you to do easier debugging. All of these errors are exposed on the sequelize object and the sequelize constructor.
  4. * All sequelize errors inherit from the base JS error object.
  5. *
  6. * This means that errors can be accessed using `Sequelize.ValidationError`
  7. * The Base Error all Sequelize Errors inherit from.
  8. */
  9. class BaseError extends Error {
  10. constructor(message) {
  11. super(message);
  12. this.name = 'SequelizeBaseError';
  13. }
  14. }
  15. module.exports = BaseError;