feat: Update warning notify when the process module's external::shell error

This commit is contained in:
zhaoyi.wu 2024-03-06 21:54:04 +08:00 committed by Prajna
parent 36b3842a38
commit 14f458213b

View file

@ -27,13 +27,13 @@ impl Process {
Some(code) => format!("Exited with status code: {code}"), Some(code) => format!("Exited with status code: {code}"),
None => "Process terminated by signal".to_string(), None => "Process terminated by signal".to_string(),
}; };
AppProxy::warn("Process failed", message.as_str()); AppProxy::notify_warn("Process failed", message.as_str());
} }
self.succ(task.id)?; self.succ(task.id)?;
} }
Err(e) => { Err(e) => {
self.prog.send(TaskProg::New(task.id, 0))?; AppProxy::notify_warn("Process failed", format!("Failed to spawn process: {e}").as_str());
self.fail(task.id, format!("Failed to spawn process: {e}"))?; self.succ(task.id)?;
} }
} }
return Ok(AppProxy::resume()); return Ok(AppProxy::resume());