1
0
mirror of https://github.com/ceph/ceph synced 2024-12-16 00:15:35 +00:00

rbd: don't append an extra newline after some errors

Don't append an extra newline after program_options-generated errors,
like "unrecognised option" or "the argument for option is invalid".

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
This commit is contained in:
Ilya Dryomov 2015-11-30 17:19:12 +01:00
parent 1c8468168c
commit d133f423c8

View File

@ -153,13 +153,13 @@ int Shell::execute(int arg_count, const char **arg_values) {
return std::abs(r);
}
} catch (po::required_option& e) {
std::cerr << "rbd: " << e.what() << std::endl << std::endl;
std::cerr << "rbd: " << e.what() << std::endl;
return EXIT_FAILURE;
} catch (po::too_many_positional_options_error& e) {
std::cerr << "rbd: too many positional arguments or unrecognized optional "
<< "argument" << std::endl;
} catch (po::error& e) {
std::cerr << "rbd: " << e.what() << std::endl << std::endl;
std::cerr << "rbd: " << e.what() << std::endl;
return EXIT_FAILURE;
}