2023-07-26 22:31:52 -07:00
|
|
|
/*
|
2024-02-13 07:59:27 -08:00
|
|
|
* SPDX-FileCopyrightText: syuilo and misskey-project
|
2023-07-26 22:31:52 -07:00
|
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
*/
|
|
|
|
|
2019-02-21 18:46:58 -08:00
|
|
|
/**
|
|
|
|
* 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 ?? '';
|
2019-02-21 18:46:58 -08:00
|
|
|
this.id = id;
|
|
|
|
}
|
|
|
|
}
|