We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4bcad9a commit 1ceebdbCopy full SHA for 1ceebdb
src/egraph.rs
@@ -64,12 +64,13 @@ impl EGraph {
64
cmds_str = cmds_str + &cmd.to_string() + "\n";
65
}
66
info!("Running commands:\n{}", cmds_str);
67
- match py.detach(|| self.egraph.run_program(commands)) {
+ let res = py.detach(|| self.egraph.run_program(commands));
68
+ if let Some(err) = PyErr::take(py) {
69
+ return Err(WrappedError::Py(err));
70
+ }
71
+ match res {
72
Err(e) => Err(WrappedError::Egglog(e)),
73
Ok(outputs) => {
- if let Some(err) = PyErr::take(py) {
- return Err(WrappedError::Py(err));
- }
74
if let Some(cmds) = &mut self.cmds {
75
cmds.push_str(&cmds_str);
76
0 commit comments