All files / libs/reporting/dashboards-v2/shared/src/lib/exceptions unsupported-chart-xaxis-exception.ts

0% Statements 0/14
0% Branches 0/1
0% Functions 0/1
0% Lines 0/14

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15                             
import { type ChartDisplaySettingsXAxisIdentifier } from '@amalia/reporting/dashboards-v2/types';

/**
 * Exception thrown when an unsupported chart X-Axis is encountered.
 *
 * It happens because we use type-guards everywhere and we need to
 * handle a new case at multiple places when a new X-Axis is added.
 */
export class UnsupportedChartXAxisException extends Error {
  public constructor(chartXAxisIdentifier: ChartDisplaySettingsXAxisIdentifier) {
    super(`Unsupported chart X-axis: ${chartXAxisIdentifier}`);
    Error.captureStackTrace(this, UnsupportedChartXAxisException);
  }
}