IRL i would probably design a FileSender with only the send()-method. If we just look at the send()-method. It's a void method that throws SenderException. However sendFiles() is supposed to send multiple files.
Regarding design we have two alternatives.
stop execution on first failure and get information about the one file that couldn't be sent.
continue execution and return SenderReport with information about every failed file.
Overall i agree that void is a perfectly fine "return type" and it should inform clients about failures with exceptions. No true/false for success/failure. Command Query separation works.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
IRL i would probably design a FileSender with only the send()-method. If we just look at the send()-method. It's a void method that throws SenderException. However sendFiles() is supposed to send multiple files.
Regarding design we have two alternatives.
stop execution on first failure and get information about the one file that couldn't be sent.
continue execution and return SenderReport with information about every failed file.
Overall i agree that void is a perfectly fine "return type" and it should inform clients about failures with exceptions. No true/false for success/failure. Command Query separation works.