LastMUD/internal/game/ecs/error.go
Miroslav Vasilev b2212a279c ECS refactor
2025-06-25 20:14:07 +03:00

23 lines
332 B
Go

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
}