mirror of
https://gitlab.freedesktop.org/pipewire/helvum
synced 2026-03-15 19:46:10 +08:00
Slightly improve logging
This commit is contained in:
@@ -6,6 +6,7 @@ use gtk::{
|
|||||||
prelude::*,
|
prelude::*,
|
||||||
subclass::prelude::*,
|
subclass::prelude::*,
|
||||||
};
|
};
|
||||||
|
use log::{error, warn};
|
||||||
|
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
|
|
||||||
@@ -249,6 +250,8 @@ impl GraphView {
|
|||||||
let mut nodes = private.nodes.borrow_mut();
|
let mut nodes = private.nodes.borrow_mut();
|
||||||
if let Some(node) = nodes.remove(&id) {
|
if let Some(node) = nodes.remove(&id) {
|
||||||
node.unparent();
|
node.unparent();
|
||||||
|
} else {
|
||||||
|
warn!("Tried to remove non-existant node (id={}) from graph", id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -258,11 +261,9 @@ impl GraphView {
|
|||||||
if let Some(node) = private.nodes.borrow_mut().get_mut(&node_id) {
|
if let Some(node) = private.nodes.borrow_mut().get_mut(&node_id) {
|
||||||
node.add_port(port_id, port);
|
node.add_port(port_id, port);
|
||||||
} else {
|
} else {
|
||||||
// FIXME: Log this instead
|
error!(
|
||||||
log::error!(
|
|
||||||
"Node with id {} not found when trying to add port with id {} to graph",
|
"Node with id {} not found when trying to add port with id {} to graph",
|
||||||
node_id,
|
node_id, port_id
|
||||||
port_id
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user