diff --git a/exceptions/illegal_arguments.go b/exceptions/illegal_arguments.go new file mode 100644 index 0000000..8760a4d --- /dev/null +++ b/exceptions/illegal_arguments.go @@ -0,0 +1,19 @@ +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) +}