MCPcopy Create free account
hub / github.com/dropbox/godropbox / GetMessage

Function GetMessage

errors/errors.go:64–75  ·  view source on GitHub ↗

This returns the error string without stack trace information.

(err interface{})

Source from the content-addressed store, hash-verified

62
63// This returns the error string without stack trace information.
64func GetMessage(err interface{}) string {
65 switch e := err.(type) {
66 case DropboxError:
67 return extractFullErrorMessage(e, false)
68 case runtime.Error:
69 return runtime.Error(e).Error()
70 case error:
71 return e.Error()
72 default:
73 return "Passed a non-error to GetMessage"
74 }
75}
76
77// This returns a string with all available error information, including inner
78// errors that are wrapped by this errors.

Calls 2

extractFullErrorMessageFunction · 0.85
ErrorMethod · 0.65