electricity_bill_calc_service/exceptions/illegal_arguments.go

20 lines
383 B
Go

package exceptions
import "fmt"
type IllegalArgumentsError struct {
Message string
Arguments []string
}
func NewIllegalArgumentsError(msg string, arguments ...string) IllegalArgumentsError {
return IllegalArgumentsError{
Message: msg,
Arguments: arguments,
}
}
func (e IllegalArgumentsError) Error() string {
return fmt.Sprintf("Illegal Arguments, %s", e.Message)
}