How do you handle improper function arguments?

George - Jun 19 '19 - - Dev Community

I've recently been thinking about how to improve my code patterns to give my work a more consistent and easy to understand feel.

Working functionally means that every function must return a response. If a function was to receive incorrect arguments, then how should it respond?

Returning false for any anomalous behaviour (invalid input/error catch) and handling that in the parent is the best solution I have come up with.

How do you handle this scenario?

. . . . . . . .
Terabox Video Player