Add Cursor error type

This commit is contained in:
Eric Rumsey 2025-05-27 17:42:09 -05:00
parent 300a538314
commit 4f1847efa8

12
src/lib/painter/errors.ts Normal file
View File

@ -0,0 +1,12 @@
export class PaintCursorError extends Error {
cursorX
cursorY
constructor(message: string, {x, y}: {x: unknown, y: unknown}) {
super(message)
this.name = this.constructor.name
this.cursorX = !x ? 'No data' : x
this.cursorY = !y ? 'No data' : y
}
}