Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

Racer error propagated to user #122

Closed
nrc opened this issue Dec 22, 2016 · 4 comments
Closed

Racer error propagated to user #122

nrc opened this issue Dec 22, 2016 · 4 comments

Comments

@nrc
Copy link
Member

nrc commented Dec 22, 2016

If you get a jump to def error in Racer, we should catch it, not panic.

@nrc nrc added this to the Alpha #2 milestone Dec 22, 2016
@nrc
Copy link
Member Author

nrc commented Jan 12, 2017

I believe that we do in fact catch it, but that before catching the panicking thread prints an error message to stderr which appears in the VSCode console. We could install a panic handler to not print the panic, but that would also override the behaviour on the main thread which may or may not be desirable. In any case, the RLS itself does not crash, so I don't think this is super important to fix,

@nrc nrc removed this from the Alpha #2 milestone Jan 12, 2017
@jonasbb
Copy link
Contributor

jonasbb commented Jan 16, 2017

Do you mean this message?

Request textDocument/definition failed.
Message: GotoDef failed to complete successfully
Code: -32601

This is not printed on stderr. All stderr is captured in the vscode extension an thrown away. It is caused by this line in action.rs:

out.failure(id, "GotoDef failed to complete successfully");

@nrc
Copy link
Member Author

nrc commented Jan 17, 2017

stderr is not thrown away, you can see it in the console if you switch to the RLS view. I'm talking about the "thread has panicked" + backtrace message.

@jonasbb
Copy link
Contributor

jonasbb commented Jan 17, 2017

I realized that you are probably running the extension in DEV_MODE.
With DEV_MODE === false the stderr is not shown https://github.com/jonathandturner/rls_vscode/blob/d3978ca62e0106dbc0f07ddc8e4f2801a6cec00d/src/extension.ts#L39

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants