export class DependentRecordsError extends Error {
  constructor(message = 'Dependent records exist') {
    super(message);
    this.name = 'DependentRecordsError';
    // Maintains proper stack trace for where our error was thrown (only on V8)
    if (typeof Error.captureStackTrace === 'function') {
      Error.captureStackTrace(this, this.constructor);
    }
  }
}

export default DependentRecordsError;
