Files
monkey/internal/object/error.go
Chuck Smith 12d43c9835
Some checks failed
Publish Image / publish (push) Waiting to run
Test / build (push) Waiting to run
Build / build (push) Has been cancelled
Refactor Type to be an int
2024-03-29 11:01:15 -04:00

26 lines
346 B
Go

package object
type Error struct {
Message string
}
func (e *Error) Bool() bool {
return false
}
func (e *Error) Type() Type {
return ErrorType
}
func (e *Error) Inspect() string {
return "Error: " + e.Message
}
func (e *Error) Clone() Object {
return &Error{Message: e.Message}
}
func (e *Error) String() string {
return e.Message
}