INNER CODE UNIT · Rust

print_error

upvpn/upvpn-app · upvpn-daemon/src/lib.rs:50

fn print_error(e: &dyn Error) {
    tracing::error!("error: {}", e);
    let mut cause = e.source();
    while let Some(e) = cause {
        tracing::error!("caused by: {}", e);
        cause = e.source();
    }
}

pub async fn create_daemon(shutdown_manager: &ShutdownManager) -> Result<Daemon, String> {
    if already_running().await {
        return Err("Upvpn Daemon is already running".to_owned());
    }

    #[cfg(any(target_os = "macos", target_os = "linux"))]
    remove_old_socket_file().await;

    // root user is required otherwise vpn setup will fail

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…