MCPcopy Index your code
hub / github.com/jetify-com/devbox / exportedErrType

Function exportedErrType

internal/telemetry/sentry.go:153–166  ·  view source on GitHub ↗

exportedErrType returns the underlying type name of err if it's exported. Otherwise, it returns an empty string.

(err error)

Source from the content-addressed store, hash-verified

151// exportedErrType returns the underlying type name of err if it's exported.
152// Otherwise, it returns an empty string.
153func exportedErrType(err error) string {
154 t := reflect.TypeOf(err)
155 if t == nil {
156 return ""
157 }
158 if t.Kind() == reflect.Pointer {
159 t = t.Elem()
160 }
161 name := t.Name()
162 if r, _ := utf8.DecodeRuneInString(name); unicode.IsUpper(r) {
163 return t.String()
164 }
165 return ""
166}
167
168// splitPkgFunc splits a fully-qualified function or method name into its
169// package path and base name components.

Callers 1

newSentryExceptionFunction · 0.85

Calls 1

StringMethod · 0.45

Tested by

no test coverage detected