Sharkey/packages/backend/src/misc/identifiable-error.ts
2024-02-13 15:59:27 +00:00

18 lines
342 B
TypeScript

/*
* SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
/**
* ID付きエラー
*/
export class IdentifiableError extends Error {
public message: string;
public id: string;
constructor(id: string, message?: string) {
super(message);
this.message = message ?? '';
this.id = id;
}
}