Merge pull request #18524 from yang-g/cli

Log error to stderr
pull/18557/head
Yang Gao 6 years ago committed by GitHub
commit ca846bbcbb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 15
      test/cpp/util/proto_reflection_descriptor_database.cc

@ -44,14 +44,17 @@ ProtoReflectionDescriptorDatabase::~ProtoReflectionDescriptorDatabase() {
Status status = stream_->Finish();
if (!status.ok()) {
if (status.error_code() == StatusCode::UNIMPLEMENTED) {
gpr_log(GPR_INFO,
fprintf(stderr,
"Reflection request not implemented; "
"is the ServerReflection service enabled?");
"is the ServerReflection service enabled?\n");
} else {
fprintf(stderr,
"ServerReflectionInfo rpc failed. Error code: %d, message: %s, "
"debug info: %s\n",
static_cast<int>(status.error_code()),
status.error_message().c_str(),
ctx_.debug_error_string().c_str());
}
gpr_log(GPR_INFO,
"ServerReflectionInfo rpc failed. Error code: %d, details: %s",
static_cast<int>(status.error_code()),
status.error_message().c_str());
}
}
}

Loading…
Cancel
Save