Menu

#657 Add abort command

Version 6
closed-accepted
nobody
None
5
2025-07-21
2014-03-07
No

The attached patch add an "abort" command, which directly bails to the command line
(either the interactive gnuplot command line or the system command line in batch mode).
I found this especially useful for debugging nested scripts.

1 Attachments

Discussion

  • Ethan Merritt

    Ethan Merritt - 2014-03-08

    I am reminded that there is a Feature Request (#315) for a mechanism to catch exceptions. This isn't quite the same thing but seems related. Shouldn't there be some way for the top-level to detect that the return came from "abort" rather than normal completion? If nothing else the abort code could set GPVAL_ERRNO. But there may be a cleverer option.

     
  • Ethan Merritt

    Ethan Merritt - 2014-03-08

    Another question.
    What is the difference between "abort" and "int_error(NO_CARET, 'abort')"?

     
  • Ethan Merritt

    Ethan Merritt - 2014-06-15

    I have added this capability in a slightly different form. Since the action taken is close to the existing "exit/quit" command, I have added this in the form of a new option:

      exit error "error message"
    

    In non-interactive mode it prints the message and exits. In interactive mode it prints the message and returns to the top-level command line. Because it goes via int_error() all the various error cleanup routines are called so that any subsequent top level commands start from a coherent state.

    Thanks for the inspiration.

     
  • Ethan Merritt

    Ethan Merritt - 2014-06-15
    • status: open --> pending-accepted
    • Group: --> Version 5
     
  • Ethan Merritt

    Ethan Merritt - 2014-06-18
    • status: pending-accepted --> closed-accepted
     

Log in to post a comment.

MongoDB Logo MongoDB