feat: Improve service manager testing and error handling

- Add comprehensive testing instructions to README.
- Improve error handling in examples to prevent crashes.
- Enhance launchctl error handling for production safety.
- Improve zinit error handling for production safety.
- Remove obsolete plan_to_fix.md file.
- Update Rhai integration tests for improved robustness.
- Improve service manager creation on Linux with systemd fallback.
This commit is contained in:
Mahmoud-Emad
2025-07-02 12:05:03 +03:00
parent a63cbe2bd9
commit 95122dffee
12 changed files with 473 additions and 422 deletions

View File

@@ -10,7 +10,13 @@ use std::thread;
use std::time::Duration;
fn main() {
let manager = create_service_manager();
let manager = match create_service_manager() {
Ok(manager) => manager,
Err(e) => {
eprintln!("Error: Failed to create service manager: {}", e);
return;
}
};
let service_name = "com.herocode.examples.spaghetti";
let service_config = ServiceConfig {

View File

@@ -5,7 +5,13 @@ use std::time::Duration;
fn main() {
// 1. Create a service manager for the current platform
let manager = create_service_manager();
let manager = match create_service_manager() {
Ok(manager) => manager,
Err(e) => {
eprintln!("Error: Failed to create service manager: {}", e);
return;
}
};
// 2. Define the configuration for our new service
let service_name = "com.herocode.examples.simpleservice";