I have been thinking about capturing run time data that lead to exceptions. The exceptions like Divide by zero, array index out of bounds, null pointer exceptions occur in practical scenarios and one has to go back to log files, then find data and then start working on it.
However, I feel one can write code in the following manner and identify the actual problem with data which will help in identifying the root cause easily. Though approach to catch Exception just for logging is reported as anti-pattern, I am of an opinion that this will eventually help in root cause identification easily.
>