Unify exception handling style

This commit is contained in:
Robbert van der Helm
2021-08-07 13:17:03 +02:00
parent 9160de6483
commit 1883888ec6
4 changed files with 7 additions and 7 deletions
+2 -2
View File
@@ -671,7 +671,7 @@ class AdHocSocketHandler {
secondary_socket.connect(endpoint);
return callback(secondary_socket);
} catch (const boost::system::system_error& e) {
} catch (const boost::system::system_error&) {
// So, what do we do when noone is listening on the endpoint
// yet? This can happen with plugin groups when the Wine
// host process does an `audioMaster()` call before the
@@ -699,7 +699,7 @@ class AdHocSocketHandler {
} else {
// Rethrow the exception if the sockets we're not
// handling the specific case described above
throw e;
throw;
}
}
}
+1 -1
View File
@@ -536,7 +536,7 @@ intptr_t Vst2PluginBridge::dispatch(AEffect* /*plugin*/,
return_value = sockets.host_vst_dispatch.send_event(
converter, std::pair<Vst2Logger&, bool>(logger, true),
opcode, index, value, data, option);
} catch (const boost::system::system_error& a) {
} catch (const boost::system::system_error&) {
// Thrown when the socket gets closed because the VST plugin
// loaded into the Wine process crashed during shutdown
logger.log("The plugin crashed during shutdown, ignoring");
@@ -217,7 +217,7 @@ Vst3PlugViewProxyImpl::setFrame(Steinberg::IPlugFrame* frame) {
// try to call those functions from an `IRunLoop` event handler.
try {
run_loop_tasks.emplace(plug_frame);
} catch (const std::runtime_error& e) {
} catch (const std::runtime_error& error) {
// In case the host does not support `IRunLoop` or if we can't
// register an event handler, we'll throw during `RunLoopTasks`'
// constructor
@@ -226,7 +226,7 @@ Vst3PlugViewProxyImpl::setFrame(Steinberg::IPlugFrame* frame) {
bridge.logger.log(
"The host does not support IRunLoop, falling back to naive GUI "
"function execution: " +
std::string(e.what()));
std::string(error.what()));
}
return bridge.send_mutually_recursive_message(YaPlugView::SetFrame{
+2 -2
View File
@@ -286,7 +286,7 @@ boost::asio::local::stream_protocol::acceptor create_acceptor_if_inactive(
try {
return boost::asio::local::stream_protocol::acceptor(io_context,
endpoint);
} catch (const boost::system::system_error& error) {
} catch (const boost::system::system_error&) {
// If this failed, then either there is a stale socket file or another
// process is already is already listening. In the last case we will
// simply throw so the other process can handle the request.
@@ -301,7 +301,7 @@ boost::asio::local::stream_protocol::acceptor create_acceptor_if_inactive(
if (file == endpoint_path) {
// Another process is already listening, so we don't have to do
// anything
throw error;
throw;
}
}