MCPcopy
hub / github.com/MHSanaei/3x-ui / NewError

Function NewError

internal/util/common/err.go:19–22  ·  view source on GitHub ↗

NewError creates a new error from the given arguments.

(a ...any)

Source from the content-addressed store, hash-verified

17
18// NewError creates a new error from the given arguments.
19func NewError(a ...any) error {
20 msg := fmt.Sprintln(a...)
21 return errors.New(msg)
22}
23
24// Recover handles panic recovery and logs the panic error if a message is provided.
25func Recover(msg string) any {

Callers 15

AddInboundMethod · 0.92
DelInboundMethod · 0.92
AddOutboundMethod · 0.92
DelOutboundMethod · 0.92
ApplyRoutingConfigMethod · 0.92
GetBalancerInfoMethod · 0.92
SetBalancerTargetMethod · 0.92
TestRouteMethod · 0.92
buildUserAccountFunction · 0.92
AddUserMethod · 0.92
GetTrafficMethod · 0.92
GetOnlineUsersMethod · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected