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

gnuplot error handling #3

Open
dilcom opened this Issue Jun 12, 2015 · 3 comments

Comments

Projects
None yet
2 participants
@dilcom
Owner

dilcom commented Jun 12, 2015

The gem should handle gnuplot's stderr pipe. Now some errors broke ruby terminal.
min: catch error messages and show them to gem's user

@dilcom dilcom added this to the 0.1.2 milestone Jun 12, 2015

@dilcom dilcom added the bug label Jun 14, 2015

dilcom added a commit that referenced this issue Jun 15, 2015

dilcom added a commit that referenced this issue Jun 15, 2015

@dilcom dilcom added enhancement and removed bug labels Jun 16, 2015

@dilcom dilcom removed this from the 0.1.2 milestone Jun 16, 2015

@dilcom

This comment has been minimized.

Owner

dilcom commented Jun 16, 2015

error handling implemented but still may be improved

dilcom added a commit that referenced this issue Jun 18, 2015

@mess110

This comment has been minimized.

mess110 commented Jun 18, 2015

Could you please provide some examples of what improvements could be done?

@dilcom

This comment has been minimized.

Owner

dilcom commented Jun 18, 2015

How error handling works now:

  1. User sends wrong command to gnuplot (e.g. plot.wrong_option('some value') )
  2. Gem checks error container for errors and executes command because container is empty
  3. Wrong command makes gnuplot to send something to sterr. Another thread in gem is listening stderr for output. Thread takes this output and puts it into container. It takes gnuplot some time (exact value depends on hardware, OS etc) to produce this error so user may execute several command during this time.
  4. Finally user runs a command, it checks container for errors and finds something. Gem raises exception in this case.
    As you see exception is raised but not during execution of command that really was wrong. Currently I don't see a way to wait for gnuplot process to execute a command. Possible improvements should do so I think.

@dilcom dilcom added may be improved and removed enhancement labels Jun 23, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment