Clarify that syserr.New must only be called during init
PiperOrigin-RevId: 197599402 Change-Id: I23eb0336195ab0d3e5fb49c0c57fc9e0715a9b75
This commit is contained in:
parent
ed2b86a549
commit
3a6070dc98
|
@ -31,6 +31,8 @@ type Error struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
// New creates a new Error and adds a translation for it.
|
// New creates a new Error and adds a translation for it.
|
||||||
|
//
|
||||||
|
// New must only be called at init.
|
||||||
func New(message string, linuxTranslation *linux.Errno) *Error {
|
func New(message string, linuxTranslation *linux.Errno) *Error {
|
||||||
err := &Error{message}
|
err := &Error{message}
|
||||||
linuxABITranslations[err] = linuxTranslation
|
linuxABITranslations[err] = linuxTranslation
|
||||||
|
|
Loading…
Reference in New Issue