Short answer: yes, maybe longer: Do not use function exception specifications. In the new standard C ++ 0x, it will be deprecated.
Why do they blame it? Because in the exception specification, C ++ does not work as in java. If you try to throw something else, you will not get any compilation error (e.g. in java). At run time, it will call the std::unexpected() function, which will call the unexpected handler function, which will terminate the program by default.
source share