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 is std :: 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

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -