mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-09-20 07:49:59 +02:00
feat: add first-class support for CJK (#8530)
This commit is contained in:
@@ -36,3 +36,28 @@ export class ImageSceneDataError extends Error {
|
||||
export class InvalidFractionalIndexError extends Error {
|
||||
public code = "ELEMENT_HAS_INVALID_INDEX" as const;
|
||||
}
|
||||
|
||||
type WorkerErrorCodes = "WORKER_URL_NOT_DEFINED" | "WORKER_IN_THE_MAIN_CHUNK";
|
||||
|
||||
export class WorkerUrlNotDefinedError extends Error {
|
||||
public code;
|
||||
constructor(
|
||||
message = "Worker URL is not defined!",
|
||||
code: WorkerErrorCodes = "WORKER_URL_NOT_DEFINED",
|
||||
) {
|
||||
super(message);
|
||||
this.name = "WorkerUrlNotDefinedError";
|
||||
this.code = code;
|
||||
}
|
||||
}
|
||||
export class WorkerInTheMainChunkError extends Error {
|
||||
public code;
|
||||
constructor(
|
||||
message = "Worker has to be in a separate chunk!",
|
||||
code: WorkerErrorCodes = "WORKER_IN_THE_MAIN_CHUNK",
|
||||
) {
|
||||
super(message);
|
||||
this.name = "WorkerInTheMainChunkError";
|
||||
this.code = code;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user