diff --git a/lib/Element.ts b/lib/Element.ts index 9c625d3..275b8e5 100644 --- a/lib/Element.ts +++ b/lib/Element.ts @@ -16,7 +16,7 @@ export class Element { const new_name = val.replace (/[^a-z0-9]/giu, '') .replace (/^[0-9]+/iu, ''); if (new_name === '') - throw new Error ('invalid name specified'); + throw new Error (`invalid node name ${val}`); this._name = new_name; }