c++ - What exceptions does boost mapped_file_source throw? -
Boost map_file_source, for example, throws an exception file not found. Is the exception square really throwing it? It does not seem to say in the documentation, unless I miss something.
Edit: Test case:
#include & lt; Boost / iostreams / device / mapped_file.hpp & gt; Int main (int argc, char ** argv) {boost :: iostreams :: mapped_file_source file; File.open (argv [1]); Return 0;
If mapping fails, code
< Code> mapped_handle_ = :: CreateFileMappingA (handle_, NULL, defense, 0, 0, zero); If (mapped_handle_ == NULL) cleanup_and_throw ("failed to create mapping");Eventually
will boost: iostreams :: detail :: throw_system_failure (msg);
i.e. Sub-class of
std :: exception
In this case, it isstd :: ios :: failure
:BOOST_IOSTREAMS_FAILURE
< P> should be std :: ios_base :: Failure to expand, and otherwise the std :: exception for the appropriate derived class.Reference:
Comments
Post a Comment