1
0
mirror of https://github.com/taigrr/gopher-os synced 2025-01-18 04:43:13 -08:00
gopher-os/kernel/error.go
2017-06-13 10:12:23 +00:00

19 lines
479 B
Go

package kernel
// Error describes a kernel error. All kernel errors must be defined as global
// variables that are pointers to the Error structure. This requirement stems
// from the fact that the Go allocator is not available to us so we cannot use
// errors.New.
type Error struct {
// The module where the error occurred.
Module string
// The error message
Message string
}
// Error implements the error interface.
func (e *Error) Error() string {
return e.Message
}