connection-error.js 470 B

12345678910111213141516171819202122
  1. 'use strict';
  2. const BaseError = require('./base-error');
  3. /**
  4. * A base class for all connection related errors.
  5. */
  6. class ConnectionError extends BaseError {
  7. constructor(parent) {
  8. super(parent ? parent.message : '');
  9. this.name = 'SequelizeConnectionError';
  10. /**
  11. * The connection specific error which triggered this one
  12. *
  13. * @type {Error}
  14. */
  15. this.parent = parent;
  16. this.original = parent;
  17. }
  18. }
  19. module.exports = ConnectionError;