try {
autoindex = Convert::ToLong(argv[2]);
- } catch (const std::invalid_argument& ex) {
+ } catch (const std::invalid_argument&) {
Log(LogCritical, "icinga-app")
<< "Invalid index for --autocomplete: " << argv[2];
return EXIT_FAILURE;
try {
fp.open(&targetPath[0], std::ios_base::trunc | std::ios_base::out);
- } catch (const std::fstream::failure& e) {
+ } catch (const std::fstream::failure&) {
close(fd);
throw;
}
if (eptr) {
try {
boost::rethrow_exception(eptr);
- } catch (const ScriptError& ex) {
+ } catch (const ScriptError&) {
eptrOut = boost::current_exception();
} catch (const std::exception& ex) {
Log(LogCritical, "ConsoleCommand")
try {
ExpressionResult tryResult = m_TryBody->Evaluate(frame, dhint);
CHECK_RESULT(tryResult);
- } catch (const std::exception& ex) {
+ } catch (const std::exception&) {
ExpressionResult exceptResult = m_ExceptBody->Evaluate(frame, dhint);
CHECK_RESULT(exceptResult);
}
req->AddHeader("Authorization", "Basic " + Base64::Encode(m_User + ":" + m_Password));
req->AddHeader("Accept", "application/json");
m_Connection->SubmitRequest(req, std::bind(TypesHttpCompletionCallback, _1, _2, callback));
- } catch (const std::exception& ex) {
+ } catch (const std::exception&) {
callback(boost::current_exception(), std::vector<ApiType::Ptr>());
}
}
req->AddHeader("Authorization", "Basic " + Base64::Encode(m_User + ":" + m_Password));
req->AddHeader("Accept", "application/json");
m_Connection->SubmitRequest(req, std::bind(ObjectsHttpCompletionCallback, _1, _2, callback));
- } catch (const std::exception& ex) {
+ } catch (const std::exception&) {
callback(boost::current_exception(), std::vector<ApiObject::Ptr>());
}
}
req->AddHeader("Authorization", "Basic " + Base64::Encode(m_User + ":" + m_Password));
req->AddHeader("Accept", "application/json");
m_Connection->SubmitRequest(req, std::bind(ExecuteScriptHttpCompletionCallback, _1, _2, callback));
- } catch (const std::exception& ex) {
+ } catch (const std::exception&) {
callback(boost::current_exception(), Empty);
}
}
try {
tlsStream->Handshake();
- } catch (const std::exception& ex) {
+ } catch (const std::exception&) {
Log(LogCritical, "ApiListener")
<< "Client TLS handshake failed (" << conninfo << ")";
return;
provider->FindTargets(type, std::bind(&FilteredAddTarget,
std::ref(permissionFrame), permissionFilter,
std::ref(frame), ufilter, std::ref(result), variableName, _1));
- } catch (const std::exception& ex) {
+ } catch (const std::exception&) {
delete ufilter;
throw;
}
try {
res = response.Parse(m_Context, false);
- } catch (const std::exception& ex) {
+ } catch (const std::exception&) {
callback(request, response);
m_Stream->Shutdown();
Dictionary::Ptr payload;
try {
payload = payloads->Get(0);
- } catch (const std::exception& ex) {
+ } catch (const std::exception&) {
std::cout << "UNKNOWN: Answer format error: 'payload' was not a Dictionary.\n";
return 3;
}
Dictionary::Ptr line;
try {
line = vline;
- } catch (const std::exception& ex) {
+ } catch (const std::exception&) {
std::cout << "UNKNOWN: Answer format error: 'lines' entry was not a Dictionary.\n";
return 3;
}
{
SC_HANDLE hSCM;
SC_HANDLE hService;
- DWORD cbBufSize, lpServicesReturned, pcbBytesNeeded;
+ DWORD cbBufSize;
DWORD lpResumeHandle = 0;
LPBYTE lpBuf = NULL;