Files
Construct-CN/packs/BP/scripts/classes/Errors/InstanceExistsError.js
T
2026-05-20 17:08:03 -07:00

15 lines
469 B
JavaScript

import { CommandResponseError } from "./CommandResponseError";
export class InstanceExistsError extends CommandResponseError {
instanceName;
constructor(instanceName) {
super(`An instance with the name "${instanceName}" already exists.`);
this.name = 'InstanceExistsError';
this.instanceName = instanceName;
}
getRawMessage() {
return { translate: 'construct.error.instanceExists', with: [this.instanceName] };
}
}