Tagged articles
panic
17 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

The article dissects five common ways misusing the close operation on Go channels can cause runtime panics, explains the underlying reasons, demonstrates correct patterns such as the single‑sender rule and for‑range consumption, and provides interview‑ready takeaways.
ConcurrencyGoInterview
0 likes · 10 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.
DebuggingGodefer
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 Rust's panic! macro, covering how to invoke it, its default behavior, options for stack unwinding versus aborting, practical code examples, and how to use backtraces for debugging, while advising when to prefer Result for recoverable errors.
Rustbacktracepanic
0 likes · 8 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 Linux kernel crash diagnostics, covering Oops messages, BUG and BUG_ON macros, the die() and panic() pathways, preparation steps for reproducing bugs, kernel configuration options for debugging, and useful memory‑debugging utilities such as MEMWATCH, YAMD, Electric Fence and strace.
Linux kernelOopsbug
0 likes · 26 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 article explains how Go's defer statements evaluate arguments, interact with panic, affect return values, and behave with os.Exit, providing clear code examples and conclusions to help developers avoid common mistakes.
defererror handlingpanic
0 likes · 5 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


政采云技术Dec 2, 2021 · Backend Development
This article explains the design of Go's error type, why errors are returned as pointers, compares error handling across languages, discusses panic, wild goroutines, sentinel and custom errors, and presents practical guidelines such as processing errors once, eliminating redundant checks, and wrapping errors for richer context.
BackendBest Practicescustom error
0 likes · 13 min read

This article explains the internal workings of Golang v1.0 coroutines, covering their creation, stack‑switching logic, scheduler design, virtual‑memory basics, assembly examples, channel handling, socket event loops, and the low‑level implementation of defer, panic, and recover.
Concurrencyassemblydefer
0 likes · 33 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
