electricity_bill_calc_service/exceptions/improper_operate.go

20 lines
378 B
Go

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)
}