Is there a way to catch any exception from STL?
-
Hail everyone, I wonder, what gonna happen with STL container, let's say vector, if there is no memory for add new element? Method push_back returns nothing. In source code of vector I was able to find only 2 exceptions, _Xlen (length_error) and _Xran (out_of_range), but nothing else. I'm not very familiar with STL, so any help is appreciated. Thanks in advance.
-
Hail everyone, I wonder, what gonna happen with STL container, let's say vector, if there is no memory for add new element? Method push_back returns nothing. In source code of vector I was able to find only 2 exceptions, _Xlen (length_error) and _Xran (out_of_range), but nothing else. I'm not very familiar with STL, so any help is appreciated. Thanks in advance.
Here are two excellent STL references. http://www.sgi.com/tech/stl/ http://www.josuttis.com/libbook/idx.html try() catch(...) // Catch any exceptions. Kuphryn