I have been doing a bit of experimenting, and have discovered that an exception is being thrown, when an integer divide by zero occurs.
#include <iostream>
#include <stdexcept>
using namespace std;
int main
(
void
)
{
try
{
int x = 3;
int y = 0;
int z = x / y;
cout << "Didn't throw or signal" << endl;
}
catch (std::exception &e)
{
cout << "Caught exception " << e.what() << endl;
}
return 0;
}
Clearly it is not throwing a std::exception. What else might it be throwing?