Skip to content

Commit 9377e98

Browse files
committed
Improve error messages
1 parent 3b8ba68 commit 9377e98

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/model/model.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ export abstract class Node extends Origin implements Destination {
280280
return this.doGetAttribute(name);
281281
}
282282
} else {
283-
throw new Error(name.toString() + " is not a feature.");
283+
throw new Error(`${name.toString()} is not a feature of ${this} (${this.nodeDefinition}).`);
284284
}
285285
}
286286

@@ -294,7 +294,7 @@ export abstract class Node extends Origin implements Destination {
294294
this.doSetAttribute(name, value);
295295
}
296296
} else {
297-
throw new Error(name.toString() + " is not a feature.");
297+
throw new Error(`${name.toString()} is not a feature of ${this} (${this.nodeDefinition}).`);
298298
}
299299
}
300300

0 commit comments

Comments
 (0)