MCPcopy
hub / github.com/c-bata/go-prompt / AssertNoError

Function AssertNoError

internal/debug/assert.go:47–55  ·  view source on GitHub ↗

AssertNoError ensures err is nil.

(err error)

Source from the content-addressed store, hash-verified

45
46// AssertNoError ensures err is nil.
47func AssertNoError(err error) {
48 if err == nil {
49 return
50 }
51 if enableAssert {
52 panic(err)
53 }
54 writeWithSync(2, "[ASSERT] "+err.Error())
55}

Callers 8

RunMethod · 0.92
setUpMethod · 0.92
tearDownMethod · 0.92
SetupMethod · 0.92
TearDownMethod · 0.92
RenderMethod · 0.92
BreakLineMethod · 0.92
emacs.goFile · 0.92

Calls 1

writeWithSyncFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…