Skip to content
Snippets Groups Projects
Commit 5350e2c8 authored by Michael Davis's avatar Michael Davis
Browse files

[xrd_ssi_pb] Removes obsolete --stderr option

parent 9ac0e6aa
No related branches found
No related tags found
No related merge requests found
......@@ -176,15 +176,12 @@ void base64Decode(cta::eos::Notification &notification, const std::string &argva
* Fill a Notification message from the command-line parameters
*
* @param[out] notification The protobuf to fill
* @param[out] isStderr --stderr appears on the command line
* @param[in] argc The number of command-line arguments
* @param[in] argv The command-line arguments
*/
void fillNotification(cta::eos::Notification &notification, bool &isStderr, int argc, const char *const *const argv)
void fillNotification(cta::eos::Notification &notification, int argc, const char *const *const argv)
{
isStderr = false;
// First argument must be a valid command specifying which workflow action to execute
if(argc < 2) throw Usage;
......@@ -211,8 +208,6 @@ void fillNotification(cta::eos::Notification &notification, bool &isStderr, int
{
const std::string argstr(argv[arg]);
if(argstr == "--stderr") { isStderr = true; continue; }
if(argstr.substr(0,2) != "--" || argc == ++arg) throw std::runtime_error("Arguments must be provided as --key value pairs");
const std::string argval(argv[arg]);
......@@ -272,9 +267,7 @@ int exceptionThrowingMain(int argc, const char *const *const argv)
// Parse the command line arguments: fill the Notification fields
bool isStderr;
fillNotification(notification, isStderr, argc, argv);
fillNotification(notification, argc, argv);
XrdSsiPb::Log::DumpProtobuf(XrdSsiPb::Log::PROTOBUF, &notification);
......@@ -303,11 +296,7 @@ int exceptionThrowingMain(int argc, const char *const *const argv)
{
using namespace cta::xrd;
case Response::RSP_SUCCESS: std::cout << response.message_txt() << std::endl;
if(isStderr) {
std::cerr << response.message_txt() << std::endl;
}
break;
case Response::RSP_SUCCESS: std::cout << response.message_txt() << std::endl; break;
case Response::RSP_ERR_PROTOBUF: throw XrdSsiPb::PbException(response.message_txt());
case Response::RSP_ERR_CTA: throw std::runtime_error(response.message_txt());
case Response::RSP_ERR_USER: throw std::runtime_error(response.message_txt());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment