@exadel/esl
Version:
Exadel Smart Library (ESL) is the lightweight custom elements library that provide a set of super-flexible components
15 lines (14 loc) • 597 B
JavaScript
/**
* Custom error that ESLCarousel throws when navigation is rejected due to ongoing animation.
* By default, it does not include a stack trace to avoid cluttering the console.
*/
export class ESLCarouselNavRejection extends Error {
constructor(index) {
super(`Navigation skipped to index ${index} due to ongoing animation`);
this.name = '[ESL] Carousel Rejection';
if (!ESLCarouselNavRejection.debug)
this.stack = undefined; // disable stack trace
}
}
/** Debug mode to enable stack trace in the error log */
ESLCarouselNavRejection.debug = false;