MCPcopy
hub / github.com/gogf/gf / New

Function New

errors/gerror/gerror_api.go:14–20  ·  view source on GitHub ↗

New creates and returns an error which is formatted from given text.

(text string)

Source from the content-addressed store, hash-verified

12
13// New creates and returns an error which is formatted from given text.
14func New(text string) error {
15 return &Error{
16 stack: callers(),
17 text: text,
18 code: gcode.CodeNil,
19 }
20}
21
22// Newf returns an error that formats as the given format and args.
23func Newf(format string, args ...any) error {

Callers 15

RegisterMethod · 0.92
DeregisterMethod · 0.92
ProceedMethod · 0.92
ProceedMethod · 0.92
Test_Model_Hook_ChainFunction · 0.92
Test_TransactionFunction · 0.92
Test_Transaction_MethodFunction · 0.92

Calls 1

callersFunction · 0.85