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

Throw on failure to connect to server #18

Closed
altre opened this issue Jan 25, 2021 · 2 comments
Closed

Throw on failure to connect to server #18

altre opened this issue Jan 25, 2021 · 2 comments

Comments

@altre
Copy link

altre commented Jan 25, 2021

I'm not quite sure, but wouldn't it be better to fail with an exception when not being able to connect to the server, instead of just logging:

println(stderr, "Error, cannot connect with server. Is it running?")

My current use case is a simple bash script which falls back to using Julia without the daemonmode if not installed or running. I would then need to parse the output in stderr instead of using the return value.

@dmolina
Copy link
Owner

dmolina commented Feb 5, 2021

I have just update the code to return the code when there is a simple error (as it cannot connect to the server, or the file is not found). It is in the current master version.
I want to return also when any exception is returned for next version, but it could take more time, because I have to change the communications.

@dmolina
Copy link
Owner

dmolina commented Feb 6, 2021

The last version is better for scripting. It returns the error code if there is an error in the case of not connection or Exception.

@dmolina dmolina closed this as completed Feb 15, 2021
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

No branches or pull requests

2 participants