Default Command + Raising of Exceptions #5
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I'm using your gem for an internal CLI project. I needed to add/change some features for the application, and wanted to share the features back upstream. In particular, catching every exception was causing us a lot of pain; catching every exception was forcing us to
kill -9every process/command that hung. I've modified the exception handling to provide a dedicated error for internal command resolution issues as well as catching Interrupt (Ctrl-C) while a command is executing, providing the expected behavior (Ctrl-C kills the current command while it's running, kills the CLI-Console shell if it isn't). Here is a relevant StackOverflow on this topic.The default command feature I added is entirely optional and shouldn't affect existing usage of CLI-Console. Simply put, I am using it to expose a SQL-like interface, without having to write something like "query" before every command.
Thanks for you consideration.