Print command errors instead of unwrapping
This commit is contained in:
parent
68fd63eaff
commit
247028caa8
|
@ -101,7 +101,12 @@ impl NodeEditor {
|
|||
};
|
||||
|
||||
if let Some(cmd) = cmd {
|
||||
self.cmd_history.push(&mut self.graph, cmd).unwrap();
|
||||
let cmd_debug = format!("{:#?}", cmd);
|
||||
|
||||
match self.cmd_history.push(&mut self.graph, cmd) {
|
||||
Ok(_) => {},
|
||||
Err(e) => eprintln!("{}:\n {:#?}", cmd_debug, e),
|
||||
}
|
||||
}
|
||||
|
||||
self.pointer_state.action = PointerAction::Idle(None); // TODO idle pointer targeting
|
||||
|
|
Loading…
Reference in New Issue