Tagged articles
recover
12 articles · Page 1 of 1
The article explains Go’s philosophy of treating errors as ordinary return values, contrasts it with try‑catch in other languages, illustrates three error scenarios (error, panic, recover) with food‑delivery analogies, provides concrete code examples, and outlines best practices and common pitfalls for safe error handling in Go.
Godefererror handling
0 likes · 11 min read

Go's unhandled panics can crash an entire monitoring agent, but by isolating each goroutine with a defer‑recover wrapper and optionally adding a circuit‑breaker, you can achieve self‑healing probes that continue operating despite transient failures, improving tool resilience and overall system availability.
circuit-breakeropspanic
0 likes · 9 min read

This article explains the distinction between errors and exceptions in Go, outlines when to use error returns versus panic/recover, and provides a series of practical patterns with code examples to write clearer, more maintainable backend code.
BackendExceptionGo
0 likes · 16 min read

This article demonstrates a concise technique for intercepting Go panics, logging detailed error messages and stack traces using defer, recover, and debug.Stack, and explains when and how to apply it in development and production environments.
Godebuggingdefer
0 likes · 8 min read

This article explains Go's error handling conventions, including returning error values, creating custom errors with the errors package, using fmt.Errorf, handling runtime panics, and recovering from them with defer, plus advanced patterns like panic‑recover wrappers and closure‑based error management, illustrated with comprehensive code examples.
custom errorserror handlingpanic
0 likes · 13 min read

This article explains Go's unique error handling approach, covering the built-in error interface, creating errors with errors.New, wrapping errors using fmt.Errorf, defining custom error types, logging errors with the log package, and managing severe failures with panic and recover, complete with practical code examples.
GoLoggingcustom error
0 likes · 15 min read

This article explains Go's error handling conventions, the built‑in error interface, how to use panic and recover for runtime exceptions, and presents practical patterns—including closure‑based handling and custom package guidelines—to write robust backend code.
Goerror handlingpanic
0 likes · 12 min read

This guide explains how to use Spring Retry’s @Retryable and @Recover annotations in Spring Boot, covering dependency setup, enabling retries, annotating methods, configuring backoff policies, handling exhausted retries, and important precautions for reliable backend retry mechanisms.
@RetryableJavaRetry Logic
0 likes · 7 min read

This article explains how ZuanZuan's operations team applies Go's error handling mechanisms—including error values, panic/recover, sentinel errors, and custom error types—along with practical guidelines and code examples to improve reliability and maintainability of production services.
Gobackend developmenterror handling
0 likes · 13 min read

This article delves into advanced Go function concepts, illustrating memory allocation diagrams, variable scopes, the use of const for globals, the behavior of defer statements, and handling errors with panic and recover, complete with code examples and visual outputs to deepen your understanding.
GoVariable Scopeconst
0 likes · 8 min read

This article explains how Go handles exceptions and errors using defer, panic, and recover, compares it with try‑catch in other languages, demonstrates the built‑in error interface, custom error types, and provides multiple code examples and analyses of their output.
ExceptionGodefer
0 likes · 6 min read

This article explores Go's panic/recover mechanism, identifies which runtime errors can be recovered, explains unrecoverable scenarios like thread exhaustion and map race, demonstrates best‑practice error handling with Go 1.13 features and popular error libraries, and offers concrete logging strategies for robust server development.
ConcurrencyGOMAXPROCSGo
0 likes · 34 min read
