If a method checks it's input and detects illegal input, what should it do: Raise an exception (or use another error-mechanism) or do nothing/ignoring on the wrong input?
In Java the HashTable-class throws an NullPointerException if given null-references as parameter. This is sometimes annoying, but I think it may have advantages, because errors are catched early. Some other methods ignore illegal input, doing nothing. That is less annoying and normally nothing bad is happen, but there might be cases, then this behaviour causes headaches - or not?
I'm not sure, which way is better. So I ask you: What do you think on this question?