Its found that sometimes some web exceptions and sql Exceptions are not handled by Exception class. I know that should not happen. But on production I found that issue, unable to reproduce on my local computer.
try{
//some code
}
catch (Exception e){
//Sent mail and logged in db for exception
}
That doesn't work then I added
try{
//some code
}
catch (SqlException e){
//Sent mail and logged in db for exception
}
catch (Exception e){
//Sent mail and logged in db for exception
}
then it works fine. Is it possible in any case?