package exceptions import "fmt" type ImproperOperateError struct { Message string Arguments []string } func NewImproperOperateError(msg string, arguments ...string) ImproperOperateError { return ImproperOperateError{ Message: msg, Arguments: arguments, } } func (e ImproperOperateError) Error() string { return fmt.Sprintf("操作不恰当, %s", e.Message) }