electricity_bill_calc_service/exceptions/improper_operate.go

20 lines
377 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("Improper Operate, %s", e.Message)
}