Sharkey/packages/backend/src/misc/identifiable-error.ts

19 lines
353 B
TypeScript
Raw Normal View History

/*
* SPDX-FileCopyrightText: syuilo and other misskey contributors
* 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);
2022-09-17 11:27:08 -07:00
this.message = message ?? '';
this.id = id;
}
}