export class WaveformDataError extends Error {
  constructor(message: string) {
    super(message);
    this.name = 'WaveformDataError';
  }
}

export class WaveformCancellationError extends Error {
  constructor(message = 'Waveform aggregation was cancelled') {
    super(message);
    this.name = 'AbortError';
  }
}

export class WaveformRuntimeBusyError extends Error {
  constructor() {
    super('A waveform aggregation is already active');
    this.name = 'WaveformRuntimeBusyError';
  }
}

export class WaveformRuntimeTerminatedError extends Error {
  constructor() {
    super('The waveform runtime has been terminated');
    this.name = 'WaveformRuntimeTerminatedError';
  }
}
