If we return an error, send the message to stderr. This makes things
more easily scriptable because error messages won't take the place of
expected output.
Signed-off-by: Sage Weil <sage@inktank.com>
<< reply_from.name << " -> '"
<< reply_rs << "' (" << reply_rc << ")"
<< std::endl;
- else
- cout << reply_rs << std::endl;
+ else {
+ if (reply_rc >= 0)
+ cout << reply_rs << std::endl;
+ else
+ cerr << reply_rs << std::endl;
+ }
return reply_rc;
}