• Throwing and logging exception at same time creates multiple logs

The following example shows the improper and proper approach

Improper Approach

catch Exception class and log an Exception

Proper Approach

Handled only Exception instead log an error