Fixing Sonar bugs related to exception handling

Change-Id: I2b54236d876d7fbb8bd619ddecf11d765f5986fb
Signed-off-by: Reinaldo Penno <rapenno@gmail.com>