tools: update error message for Type Error

PR-URL: https://github.com/nodejs/node/pull/53047
Reviewed-By: Claudio Wunder <cwunder@gnome.org>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
Aviv Keller 2024-05-24 21:20:02 -04:00 committed by GitHub
parent bc13f23f7e
commit ccceae091a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -309,8 +309,8 @@ export function toLink(typeInput) {
`<a href="${typeUrl}" class="type">&lt;${typeTextFull}&gt;</a>`);
} else {
throw new Error(
`Unrecognized type: '${typeTextFull}'.\n` +
`Please, edit the type or update '${import.meta.url}'.`,
`Unrecognized type: '${typeTextFull}' in '${import.meta.url}'.\n` +
'Valid types can be found at https://github.com/nodejs/node/blob/HEAD/tools/doc/type-parser.mjs',
);
}
} else {