19 lines
302 B
Go
19 lines
302 B
Go
package object
|
|
|
|
type Error struct {
|
|
Message string
|
|
}
|
|
|
|
func (e *Error) Type() ObjectType {
|
|
return ERROR_OBJ
|
|
}
|
|
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
|
|
}
|