Sometimes I see the exception like "Debug Assertion Failed" from Microsoft C++ Debug Library See the following code. Code: int main() { map<int,double>m; m[1] = 123; m[34]= 321; map<int,double>::iterator itr; itr=m.find(100); //if(itr != m.end()) // I have commented this line of code cout<<itr->second<<endl; return 0; } Then I get a runtime exception like as I mentioned above. I know this can be removed If I uncomment the if statement Even with the commented if condition if I use the try catch block then alos I am not able to catch the exception. My question is how to catch this type of exception.