mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-09-01 06:25:34 +00:00
[1470] Removed declared but unused exception variable
This leads to a warning on some compiler.
This commit is contained in:
@@ -276,7 +276,7 @@ TCPSocket<C>::asyncSend(const void* data, size_t length,
|
|||||||
// ... and send it
|
// ... and send it
|
||||||
socket_.async_send(asio::buffer(send_buffer_->getData(),
|
socket_.async_send(asio::buffer(send_buffer_->getData(),
|
||||||
send_buffer_->getLength()), callback);
|
send_buffer_->getLength()), callback);
|
||||||
} catch (boost::numeric::bad_numeric_cast& e) {
|
} catch (boost::numeric::bad_numeric_cast&) {
|
||||||
isc_throw(BufferTooLarge,
|
isc_throw(BufferTooLarge,
|
||||||
"attempt to send buffer larger than 64kB");
|
"attempt to send buffer larger than 64kB");
|
||||||
}
|
}
|
||||||
|
@@ -103,7 +103,7 @@ loadQueryData(istream& input, BenchQueries& queries, const RRClass& qclass,
|
|||||||
static_cast<const unsigned char*>(buffer.getData()) +
|
static_cast<const unsigned char*>(buffer.getData()) +
|
||||||
buffer.getLength());
|
buffer.getLength());
|
||||||
queries.push_back(query_data);
|
queries.push_back(query_data);
|
||||||
} catch (const Exception& error) {
|
} catch (const Exception&) {
|
||||||
if (strict) {
|
if (strict) {
|
||||||
isc_throw(BenchMarkError,
|
isc_throw(BenchMarkError,
|
||||||
"failed to parse/create query around line " <<
|
"failed to parse/create query around line " <<
|
||||||
|
@@ -742,7 +742,7 @@ MapElement::find(const std::string& id, ConstElementPtr t) const {
|
|||||||
t = p;
|
t = p;
|
||||||
return (true);
|
return (true);
|
||||||
}
|
}
|
||||||
} catch (const TypeError& e) {
|
} catch (const TypeError&) {
|
||||||
// ignore
|
// ignore
|
||||||
}
|
}
|
||||||
return (false);
|
return (false);
|
||||||
|
@@ -139,7 +139,7 @@ LibDHCP::packOptions6(boost::shared_array<uint8_t> data,
|
|||||||
offset = it->second->pack(data, data_len, offset);
|
offset = it->second->pack(data, data_len, offset);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (const Exception& e) {
|
catch (const Exception&) {
|
||||||
cout << "Packet build failed (Option build failed)." << endl;
|
cout << "Packet build failed (Option build failed)." << endl;
|
||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
|
@@ -237,10 +237,10 @@ logConfigUpdate(PyObject*, PyObject* args) {
|
|||||||
} catch (const isc::data::JSONError& je) {
|
} catch (const isc::data::JSONError& je) {
|
||||||
std::string error_msg = std::string("JSON format error: ") + je.what();
|
std::string error_msg = std::string("JSON format error: ") + je.what();
|
||||||
PyErr_SetString(PyExc_TypeError, error_msg.c_str());
|
PyErr_SetString(PyExc_TypeError, error_msg.c_str());
|
||||||
} catch (const isc::data::TypeError& de) {
|
} catch (const isc::data::TypeError&) {
|
||||||
PyErr_SetString(PyExc_TypeError, "argument 1 of log_config_update "
|
PyErr_SetString(PyExc_TypeError, "argument 1 of log_config_update "
|
||||||
"is not a map of config data");
|
"is not a map of config data");
|
||||||
} catch (const isc::config::ModuleSpecError& mse) {
|
} catch (const isc::config::ModuleSpecError&) {
|
||||||
PyErr_SetString(PyExc_TypeError, "argument 2 of log_config_update "
|
PyErr_SetString(PyExc_TypeError, "argument 2 of log_config_update "
|
||||||
"is not a correct module specification");
|
"is not a correct module specification");
|
||||||
} catch (const std::exception& e) {
|
} catch (const std::exception& e) {
|
||||||
|
@@ -59,7 +59,7 @@ parseAddresses(isc::data::ConstElementPtr addresses,
|
|||||||
result.push_back(AddressPair(addr->stringValue(),
|
result.push_back(AddressPair(addr->stringValue(),
|
||||||
port->intValue()));
|
port->intValue()));
|
||||||
}
|
}
|
||||||
catch (const TypeError &e) { // Better error message
|
catch (const TypeError&) { // Better error message
|
||||||
LOG_ERROR(logger, SRVCOMM_ADDRESS_TYPE).
|
LOG_ERROR(logger, SRVCOMM_ADDRESS_TYPE).
|
||||||
arg(addrPair->str());
|
arg(addrPair->str());
|
||||||
isc_throw(TypeError,
|
isc_throw(TypeError,
|
||||||
|
@@ -191,7 +191,7 @@ tokenToNum(const std::string& num_token) {
|
|||||||
NumType num;
|
NumType num;
|
||||||
try {
|
try {
|
||||||
num = boost::lexical_cast<NumType>(num_token);
|
num = boost::lexical_cast<NumType>(num_token);
|
||||||
} catch (const boost::bad_lexical_cast& ex) {
|
} catch (const boost::bad_lexical_cast&) {
|
||||||
isc_throw(StringTokenError, "Invalid SRV numeric parameter: " <<
|
isc_throw(StringTokenError, "Invalid SRV numeric parameter: " <<
|
||||||
num_token);
|
num_token);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user