Tags: #error-handling

DrunkLeen

21 Dec 2025
#programming#rust#error-handling#unsafe-rust

Unsafe Rust starts where Rust no longer guarantees safety

This article explains what unsafe really means in Rust and why it exists. unsafe does not turn safety off; it shifts responsibility from the compiler to the programmer. By looking at real code examples, we see how raw pointers work, what Undefined Behavior is, and why it is far more dangerous than a simple panic. Finally, the article shows how unsafe should be used correctly: kept small, controlled, and hidden behind safe abstractions, with clear invariants that make the rest of the code safe to use.

03 Dec 2025
#rust#programming#error-handling#tokio#async

Error Management in async Rust β€” from practical experience to architectural depth

A small async Rust project shows how to run multiple HTTP requests in parallel, apply timeouts, isolate panics, and clearly classify errors. The focus is not just speed, but building predictable, meaningful concurrency in real-world systems. True async isn’t about writing code β€” it’s about understanding how to give structure to simultaneous work.

15 Nov 2025
#rust#async#error-handling#tokio

Error Handling in Async Rust: From a Simple Function to a Real Health Monitor

The post explains how to handle errors properly in Rust async code. It shows why async errors are harder to debug, how to add useful context with anyhow, when to use structured errors with thiserror, and how to apply real patterns like timeouts, retries, JoinSet, select!, and tracing. It all comes together in a small CLI tool, leen-health, which checks multiple endpoints and outputs a clean JSON health report.