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

Don't crash when parsing options #25

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mosterdt
Copy link

Without catching the unknown option exception, gebaard crashes with an abort:

$ gebaard -d
terminate called after throwing an instance of 'cxxopts::option_not_exists_exception'
  what():  Option ‘d’ does not exist
[1]    11684 abort (core dumped)  gebaard -d

This pull request fixes this by catching the exception (as seen in https://github.com/jarro2783/cxxopts/blob/master/src/example.cpp), with the following result:

$ ./gebaard -d
error parsing options: Option ‘d’ does not exist

Thanks for creating gebaar! I finally got around to using it. It's a nice improvement to the alternatives. (Greetings from #bspwm!)

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.

1 participant