Python Tutorial #11: Error Handling — try/except, Custom Exceptions, and Patterns

In the previous tutorial, we learned about dataclasses and Pydantic. Now let’s learn about error handling — how to write code that fails gracefully instead of crashing. Every program encounters errors. Files go missing, networks fail, users enter bad data. Good error handling is the difference between a program that crashes with a confusing traceback and one that tells the user what went wrong and how to fix it. By the end of this tutorial, you will know how to catch errors, create custom exceptions, and choose the right error handling pattern. ...

April 27, 2026 · 9 min

KMP Tutorial #14: Error Handling and Logging in Kotlin Multiplatform

Your app will crash. The network will fail. The server will return unexpected data. The database will be empty when it should not be. The question is not if errors happen — it is how you handle them. Good error handling makes the difference between an app that shows a helpful message and an app that shows a blank screen. In KMP, you need error handling that works on every platform. No Android-specific exceptions, no iOS-specific patterns. Shared error handling for shared code. ...

April 5, 2026 · 8 min

Rust Tutorial #8: Error Handling

In the previous tutorial, we learned enums and pattern matching. We also saw Option<T> for values that might not exist. Now we learn how Rust handles errors. Most languages use exceptions — you throw an error and hope someone catches it. Rust does not have exceptions. Instead, Rust uses types to represent errors. The compiler forces you to handle them. No surprise crashes. No unhandled exceptions. Two Kinds of Errors Rust splits errors into two categories: ...

March 26, 2026 · 7 min

Kotlin Tutorial #14: Error Handling — try/catch, Result, and Patterns

In the previous tutorial, you learned about interfaces and generics. Now let’s learn about error handling. Every program needs to handle errors. Kotlin gives you several tools for this, from traditional try/catch to the modern Result type. In this tutorial, you will learn: try/catch/finally try as an expression Custom exceptions The Result type (runCatching, getOrElse, map, fold) Sealed classes for errors Error handling patterns and best practices try/catch/finally The try/catch block catches exceptions. finally always runs, even after an exception. ...

March 22, 2026 · 8 min