
I've written a custom language server for a SQL-like language using the language designer and have implemented it as a C# DLL that my client application consumes. I'm trying to find a way to catch unhandled exceptions thrown by the language server in my client app so I can log the error, gracefully shutdown the language server, and fall back to the .langdef created out of the same Language Designer project without my client app terminating. I can't use app Dispatcher.UnhandledException event becauase the server isn't running on the UI thread. I have looked at the AppDomain.UnhandledException event but that doesn't give the option to prevent the client application from terminating like the Dispatcher.UnhandledException event does and I don't see any kind of event on SyntaxEditor that provides that kind of feedback.
Any idea how I can accomplish this?
Thanks.