Actually throw the exception in pulseaudio errors

This commit is contained in:
Patrick Nicolas
2023-11-10 21:51:52 +01:00
parent 6658ae5549
commit a60bf88636
+2 -2
View File
@@ -180,7 +180,7 @@ module_entry ensure_sink(pa_context * ctx, const char * name, const std::string
sink = get_sink(ctx, name);
if (not sink)
std::runtime_error("failed to create audio sink " + std::string(name));
throw std::runtime_error("failed to create audio sink " + std::string(name));
sink->socket = fifo;
add_cleanup_function(unload_module, sink->module);
@@ -214,7 +214,7 @@ module_entry ensure_source(pa_context * ctx, const char * name, const std::strin
source = get_source(ctx, name);
if (not source)
std::runtime_error("failed to create audio source " + std::string(name));
throw std::runtime_error("failed to create audio source " + std::string(name));
source->socket = fifo;
return *source;
}