Skip to content

How to customize validation error msg for unresolved variable? #1692

Answered by msujew
durianwaffle asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @durianwaffle,

You can override the default linker for that, see:

protected createLinkingError(refInfo: ReferenceInfo, targetDescription?: AstNodeDescription): LinkingError {
// Check whether the document is sufficiently processed by the DocumentBuilder. If not, this is a hint for a bug
// in the language implementation.
const document = findRootNode(refInfo.container).$document;
if (document && document.state < DocumentState.ComputedScopes) {
console.warn(`Attempted reference resolution before document reached ComputedScopes state (${document.uri}).`);
}
const r…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@durianwaffle
Comment options

Answer selected by durianwaffle
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants