corrected Issue #17  : NullPointerExeption is cacthed and message is Sql Error

This is a partial correction , this depends on issue #16 , so corrected only
those areas where issue #16 has been corrected

Signed-off-by: Ashish Namdev <ashish28.sirt@gmail.com>