mirror of
https://github.com/johnkerl/miller.git
synced 2026-07-17 16:38:54 +00:00
Improve error propagation (#1975)
This commit is contained in:
parent
1e762d7c4c
commit
e1346691da
71 changed files with 1252 additions and 911 deletions
|
|
@ -7,8 +7,10 @@ import (
|
|||
"runtime"
|
||||
)
|
||||
|
||||
// InternalCodingErrorIf is a lookalike for C's __FILE__ and __LINE__ printing,
|
||||
// with exit 1 if the condition is true.
|
||||
// InternalCodingErrorIf reports an internal bug and exits. Use only for
|
||||
// "should never happen" conditions (assertions), not for user or I/O errors.
|
||||
// This is intentionally an exit helper: these indicate programmer error,
|
||||
// and the codebase prefers returning error for recoverable failures.
|
||||
func InternalCodingErrorIf(condition bool) {
|
||||
if !condition {
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue