Java · Exceptions, files and recursion
A method handed a value it can't work with can refuse loudly, so the mistake shows up where it was made.