d-language-server / dls

A Language Server implementation for D
http://dls.dub.pm
106 stars 15 forks source link

No logs written in case of crash #32

Open andre2007 opened 5 years ago

andre2007 commented 5 years ago

I use Dls within IntelliJ using LSP plugin. LSP notifies me in case Dls is crashing. Unfortunately the Dls log file does not contain any information about the crash. Actually the log does not even indicate that a crash occurred.

Could you check whether you could write exception stack trace to the log file?

LaurentTreguier commented 5 years ago

When DLS crashes, it's because of an Error, all Exceptions are handled as "internal errors". So by default, I simply let DLS die a horrible death when it happens, since doing anything after an Error has been thrown is potentially unsafe. Since #12, there is a catchErrors initialization option, that actually lets DLS catche errors too. I would tend to argue that it could be the role of the client to check the process' stderr when it crashes though.