Skip to main content
Version: Next

FlickingError

class FlickingError extends Error

Special type of known error that Flicking throws.

PROPERTYTYPEDESCRIPTION
codenumberError code
messagestringError message

See:

constructor

new FlickingError(message, code)
PARAMETERTYPEOPTIONALDEFAULTDESCRIPTION
messagestringError message
codenumberError code
import Flicking, { FlickingError, ERROR_CODES } from "@egjs/flicking";
try {
const flicking = new Flicking(".flicking-viewport")
} catch (e) {
if (e instanceof FlickingError && e.code === ERROR_CODES.ELEMENT_NOT_FOUND) {
console.error("Element not found")
}
}