Skip to content
Snippets Groups Projects
Commit c993f4d1 authored by rhenck's avatar rhenck
Browse files

[editor] Extend error message for IDErrors

parent 9bf65d42
No related branches found
No related tags found
No related merge requests found
...@@ -120,13 +120,13 @@ export abstract class UIElement implements UIElementProperties { ...@@ -120,13 +120,13 @@ export abstract class UIElement implements UIElementProperties {
abstract getDuplicate(): UIElement; abstract getDuplicate(): UIElement;
registerIDs(): void { registerIDs(): void {
if (!this.idService) throw new Error('IDService not available'); if (!this.idService) throw new Error(`IDService not available: ${this.type} ${this.id}`);
this.idService.register(this.id, this.type, true, false); this.idService.register(this.id, this.type, true, false);
this.idService.register(this.alias, this.type, false, true); this.idService.register(this.alias, this.type, false, true);
} }
unregisterIDs(): void { unregisterIDs(): void {
if (!this.idService) throw new Error('IDService not available'); if (!this.idService) throw new Error(`IDService not available: ${this.type} ${this.id}`);
this.idService.unregister(this.id, this.type, true, false); this.idService.unregister(this.id, this.type, true, false);
this.idService.unregister(this.alias, this.type, false, true); this.idService.unregister(this.alias, this.type, false, true);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment