Skip to content
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

Display an error instead of aborting #30

Merged
merged 1 commit into from
May 6, 2015

Conversation

wilfriedb
Copy link
Contributor

See issue #29.
If myget.org can't be reached, the script will show the next message in the Sublime Text console:

URL error [Errno -2] Name or service not known contacting API

instead of

Traceback (most recent call last):
  File "/opt/sublime_text/sublime_plugin.py", line 97, in reload_plugin
    obj = t()
  File "/home/username/.config/sublime-text-3/Packages/Kulture/Completions.py", line 27, in __init__
    for package in response:
TypeError: 'bool' object is not iterable

@sayedihashimi
Copy link
Member

Thanks for the PR, can you tell me what platforms you tested this on?

@wilfriedb
Copy link
Contributor Author

Yes of course. I've tested it on Windows 7 and Linux Mint 7.1, both with Sublime Text version 3, both with and without network connection.

The reason I made this pull request is that at my company the Completions.py aborted and I didn't know why. I thought it was the setup of my PC but later I found out that Sublime can't pass the company's proxy. I thought an error message would be more helpful than an abort and actually the script does check for errors but then ignores the result. So I made this small modification that displays the error message to the user.

sayedihashimi added a commit that referenced this pull request May 6, 2015
Display an error instead of aborting
@sayedihashimi sayedihashimi merged commit 4e29b70 into OmniSharp:master May 6, 2015
@sayedihashimi
Copy link
Member

Thanks for the contribution!

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

Successfully merging this pull request may close these issues.

2 participants