Throwing an exception is meant to be handled by the caller. Make a custom checked exception for the situation you are in and wrap important information in that checked exception so that the caller can handle it.
If the user is supposed to input something more appropriate and can respond to the system, then print out the error and give the user the ability to correct his input data.
If the system can continue to work correctly; however you wish to track some errors that might be unforeseen, you may log the error to correct the error in future releases.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…