try {
argIndex = to<int>(piece);
- } catch (const std::out_of_range& e) {
+ } catch (const std::out_of_range&) {
arg.error("argument index must be integer");
}
arg.enforce(argIndex >= 0, "argument index must be non-negative");
}
try {
return to<int>(doSplitKey<true>());
- } catch (const std::out_of_range& e) {
+ } catch (const std::out_of_range&) {
error("integer key required");
return 0; // unreached
}
void DynamicParser::wrapError(const folly::dynamic* lookup_k, Fn fn) {
try {
fn();
- } catch (DynamicParserLogicError& ex) {
+ } catch (DynamicParserLogicError&) {
// When the parser is misused, we throw all the way up to the user,
// instead of reporting it as if the input is invalid.
throw;
- } catch (DynamicParserParseError& ex) {
+ } catch (DynamicParserParseError&) {
// We are just bubbling up a parse error for OnError::THROW.
throw;
} catch (const std::exception& ex) {
s = s->get_ptr(pos);
continue;
}
- } catch (const std::range_error& e) {
+ } catch (const std::range_error&) {
// ignore
}
}
try {
val = this->parseValue(tokens);
this->transform(val);
- } catch (const std::exception& e) {
+ } catch (const std::exception&) {
throw po::invalid_option_value(
tokens.empty() ? std::string() : tokens.front());
}
}
}
}
- } catch (std::out_of_range& e) {
+ } catch (std::out_of_range&) {
// we'll use what we found and cleanup below.
VLOG(4) << "AsyncSSLSocket::clientHelloParsingCallback(): "
<< "buffer finished unexpectedly." << " AsyncSSLSocket socket=" << sock;
setupAddress(res);
}
}
- } catch (const std::system_error& e) {
+ } catch (const std::system_error&) {
// If we can't bind to the same port on ipv4 as ipv6 when using
// port=0 then we will retry again before giving up after
// kNumTries attempts. We do this by closing the sockets that
if (backoffTimeout_ == nullptr) {
try {
backoffTimeout_ = new BackoffTimeout(this);
- } catch (const std::bad_alloc& ex) {
+ } catch (const std::bad_alloc&) {
// Man, we couldn't even allocate the timer to re-enable accepts.
// We must be in pretty bad shape. Don't pause accepting for now,
// since we won't be able to re-enable ourselves later.
if (wasEmpty) {
return;
}
- } catch (const std::exception& ex) {
+ } catch (const std::exception&) {
// This catch block is really just to handle the case where the MessageT
// constructor throws. The messageAvailable() callback itself is
// declared as noexcept and should never throw.
uint8_t readbuf[128];
uint32_t bytesRead = socket->readAll(readbuf, sizeof(readbuf));
LOG(ERROR) << "readAll returned " << bytesRead << " instead of throwing";
- } catch (AsyncSocketException &e) {
+ } catch (AsyncSocketException&) {
ex = true;
}
EXPECT_TRUE(ex);
if (!pr.second) {
pr.first->second.data++;
}
- } catch (std::bad_alloc& x) {
+ } catch (std::bad_alloc&) {
LOG(INFO) << "bad alloc";
}
}
auto i2 = to<int>(42.1);
LOG(ERROR) << "to<int> returned " << i2 << " instead of throwing";
EXPECT_TRUE(false);
- } catch (std::range_error& e) {
+ } catch (std::range_error&) {
//LOG(INFO) << e.what();
}
}
<< static_cast<unsigned int>(i2)
<< " instead of throwing";
EXPECT_TRUE(false);
- } catch (std::range_error& e) {
+ } catch (std::range_error&) {
//LOG(INFO) << e.what();
}
}
<< static_cast<unsigned int>(i2)
<< " instead of throwing";
EXPECT_TRUE(false);
- } catch (std::range_error& e) {
+ } catch (std::range_error&) {
//LOG(INFO) << e.what();
}
}
auto i = to<int32_t>(x);
LOG(ERROR) << "to<int32_t> returned " << i << " instead of throwing";
EXPECT_TRUE(false);
- } catch (std::range_error& e) {
+ } catch (std::range_error&) {
}
}
LOG(ERROR) << "operator < returned "
<< static_cast<int>(foo)
<< " instead of throwing";
- } catch (std::exception const& e) {
+ } catch (std::exception const&) {
caught = true;
}
EXPECT_TRUE(caught);
a.wait();
++waitCount;
}
- } catch (ShutdownSemError& x) {
+ } catch (ShutdownSemError&) {
// expected
EXPECT_TRUE(a.isShutdown());
}
try {
a.wait();
EXPECT_TRUE(false);
- } catch (ShutdownSemError& x) {
+ } catch (ShutdownSemError&) {
// expected
EXPECT_TRUE(a.isShutdown());
}
try{
recoveredX = prettyToDouble(prettyPrint(x, formatType, addSpace),
formatType);
- } catch (std::range_error &ex){
+ } catch (std::range_error&) {
EXPECT_TRUE(false);
}
double relativeError = (x - recoveredX) / x;
try {
Uri u(s);
CHECK(false) << "Control should not have reached here";
- } catch (const std::invalid_argument& ex) {
+ } catch (const std::invalid_argument&) {
// success
}
}
try {
Uri u(s);
CHECK(false) << "Control should not have reached here";
- } catch (const std::invalid_argument& ex) {
+ } catch (const std::invalid_argument&) {
// success
}
}
try {
Uri u(s);
CHECK(false) << "Control should not have reached here";
- } catch (const std::invalid_argument& ex) {
+ } catch (const std::invalid_argument&) {
// success
}
}
try {
Uri u(s);
CHECK(false) << "Control should not have reached here";
- } catch (const std::invalid_argument& ex) {
+ } catch (const std::invalid_argument&) {
// success
}
}