omnisharp-server icon indicating copy to clipboard operation
omnisharp-server copied to clipboard

No error checking for missing solution file

Open scottbilas opened this issue 10 years ago • 1 comments

Passing in a solution path for a file that does not exist causes a crash. No error dialog, just the system crash dialog. This manifests from Sublime via a typo in the .sublime-project file as a random dialog popping up when opening a .cs file in the project. I was able to figure out the problem by attaching a debugger.

I have some suggestions to help with this problem:

  1. Check the paths for the solution and config to make sure they exist, error and abort if not (i.e. don't crash).
  2. Put in a generic top level exception handler that reports exceptions as they occur with a reasonable dialog so that a Sublime user won't be confused about what's going on.
  3. Have a way to pass back failures to launch the server to the plugin so that it can be reported in a cleaner way in the originating IDE/tool.

scottbilas avatar Nov 13 '14 10:11 scottbilas

Same thing happens with an incorrect path given in omnisharp_server_config_location in Sublime's settings.

scottbilas avatar Nov 13 '14 10:11 scottbilas