Daily Archives: April 17, 2017


Java Design Philosophy

Writing a Library Exception Always throw exception as early as possible.

2. Hide detailed implementation exception from the upper caller. Always throw meaningful exceptions to caller (client)

IllegalArgumentException: the argument the caller passed to the library is incorrect. IllegalStateException: something wrong with the internal library implementation.