Java · Exceptions, files and recursion

Throwing an exception

A method handed a value it can't work with can refuse loudly, so the mistake shows up where it was made.