O'Reilly logo
  • You Wang thinks this is interesting:

Java allows every method an alternative exit path if it is unable to complete its task in the normal way. In this situation, the method does not return a value. Instead, it throws an object that encapsulates the error information

From

Cover of Core Java® Volume I—Fundamentals, Tenth Edition

Note

return value as designed, or throw an object that represents the error