gebaar-libinput icon indicating copy to clipboard operation
gebaar-libinput copied to clipboard

Don't crash when parsing options

Open mosterdt opened this issue 5 years ago • 0 comments

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!)

mosterdt avatar Jun 11 '19 18:06 mosterdt