LastMUD/internal/game/ecs/error.go

24 lines
332 B
Go
Raw Normal View History

2025-06-25 20:14:07 +03:00
package ecs
import "fmt"
type ecsError struct {
err string
}
func newECSError(v ...any) *ecsError {
return &ecsError{
err: fmt.Sprint(v...),
}
}
func newFormattedECSError(format string, v ...any) *ecsError {
return &ecsError{
err: fmt.Sprintf(format, v...),
}
}
func (err *ecsError) Error() string {
return err.err
}