It's either that, throwing an error or doing nothing. I'm not a big fan of doing nothing, as it can create situations where people have a hard time figuring out what they are doing wrong.