In a production environment, it is useful to register a stack trace so that the user can find it when they call for technical support. Avoid printing a stack trace instead of a clear (by a typical user) message.
You do not have to worry about the effectiveness of exceptional code blocks. Recovery failure is the most important thing here.
source
share