-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix configuration error display #164
Conversation
throw fromZodError(parsed.error, { | ||
prefix: `Error parsing config file ${configURI?.fsPath}:`, | ||
prefixSeparator: "\n", | ||
issueSeparator: ";\n", | ||
unionSeparator: "\n or\n", | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a full mechanism for handling thrown errors, but instead a lot of places logged errors instead. Defaulting to throwing in most places now.
const { sendNotification: originalSendNotification } = connection; | ||
connection.sendNotification = async (...args: [any, ...any[]]) => { | ||
await whenConnectionInitialized; | ||
connection.sendNotification = originalSendNotification; | ||
connection.sendNotification(...args); | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All sendNotification
calls before the LSP client was fully started were swallowed previously - this included Debug.error
etc.
This queues them instead.
await whenConnectionInitialized; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was the one place that already had handling for that - we don't need that exception anymore.
8423e82
to
4318a11
Compare
No ideas why tests are failing on this, they pass locally. Gotta take a look tomorrow. |
258cc99
to
af8b2ae
Compare
So... |
87c95db
to
10d6866
Compare
10d6866
to
9f461ea
Compare
No description provided.