T
Teddy
Hello all
According to "Think in C++ Volume2", the code below should run
smoothly:
#include <iostream>
#include <exception>
using namespace std;
class ex {
};
void func() throw(ex) {
throw 10;
}
void my_unexpected() {
cout << "unexpected exception" << endl; // this never shows up on my
VC compilers
exit(0);
}
int main()
{
set_unexpected(my_unexpected);
try {
func();
}
catch(ex) {
cout << "ex caught" << endl;
}
return 0;
}
But on my VC2003 and VC2005 BETA2, there will be a compiling warning
and a runtime error.
VC doesn't support unexpected exception ?
or something else ?
According to "Think in C++ Volume2", the code below should run
smoothly:
#include <iostream>
#include <exception>
using namespace std;
class ex {
};
void func() throw(ex) {
throw 10;
}
void my_unexpected() {
cout << "unexpected exception" << endl; // this never shows up on my
VC compilers
exit(0);
}
int main()
{
set_unexpected(my_unexpected);
try {
func();
}
catch(ex) {
cout << "ex caught" << endl;
}
return 0;
}
But on my VC2003 and VC2005 BETA2, there will be a compiling warning
and a runtime error.
VC doesn't support unexpected exception ?
or something else ?