mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-14 04:19:59 +02:00
Unify exception handling style
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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{
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user