Tagged articles

custom error

4 articles · Page 1 of 1
Golang Shines
Golang Shines
Apr 16, 2026 · Backend Development

Go Error Handling Best Practices: From Basics to Advanced

The article explains why proper error handling is crucial for reliable Go programs, describes Go's explicit error return model, demonstrates basic techniques, introduces custom error types, error wrapping and chaining introduced in Go 1.13, outlines best‑practice guidelines, and reviews popular libraries and centralised patterns.

Error handlingGobest practices
0 likes · 12 min read
Go Error Handling Best Practices: From Basics to Advanced
FunTester
FunTester
Aug 22, 2024 · Fundamentals

Master Go Error Handling: Built-in Errors, Wrapping, and Panic/Recover

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.

Error handlingGoLogging
0 likes · 15 min read
Master Go Error Handling: Built-in Errors, Wrapping, and Panic/Recover
政采云技术
政采云技术
Dec 2, 2021 · Backend Development

Understanding Go's Error Handling: Design, Best Practices, and Common Pitfalls

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.

Error handlingbackendbest practices
0 likes · 13 min read
Understanding Go's Error Handling: Design, Best Practices, and Common Pitfalls
ITPUB
ITPUB
Mar 29, 2016 · Fundamentals

Mastering Go Error Handling: From Basic Returns to Elegant State Management

The article explains Go's lack of try/catch, demonstrates how to use error return values with examples, shows how to create custom error types, and presents an optimized pattern that aggregates error checks to produce cleaner, more efficient code without performance loss.

Gobackendcustom error
0 likes · 5 min read
Mastering Go Error Handling: From Basic Returns to Elegant State Management