MCPcopy
hub / github.com/micro-editor/micro / Error

Method Error

internal/info/infobuffer.go:82–91  ·  view source on GitHub ↗

Error sends an error message to the user

(msg ...any)

Source from the content-addressed store, hash-verified

80
81// Error sends an error message to the user
82func (i *InfoBuf) Error(msg ...any) {
83 // only display a new message if there isn't an active prompt
84 // this is to prevent overwriting an existing prompt to the user
85 if !i.HasPrompt {
86 // if there is no active prompt then style and display the message as normal
87 i.Msg = fmt.Sprint(msg...)
88 i.HasMessage, i.HasError = false, true
89 }
90 // TODO: add to log?
91}
92
93// Prompt starts a prompt for the user, it takes a prompt, a possibly partially filled in msg
94// and callbacks executed when the user executes an event and when the user finishes the prompt

Callers 15

LoadHistoryMethod · 0.95
mainFunction · 0.45
SuspendMethod · 0.45
InitBindingsFunction · 0.45
TryBindKeyFunction · 0.45
UnbindKeyFunction · 0.45
SaveAsCBMethod · 0.45
saveBufToFileMethod · 0.45
findMethod · 0.45
FindNextMethod · 0.45
FindPreviousMethod · 0.45
CutLineMethod · 0.45

Calls

no outgoing calls

Tested by 1

TestDependencyResolvingFunction · 0.36