Silicium
throw_last_error.hpp
Go to the documentation of this file.
1 #ifndef SILICIUM_THROW_LAST_ERROR_HPP
2 #define SILICIUM_THROW_LAST_ERROR_HPP
3 
5 #ifdef _WIN32
6 # include <silicium/win32/win32.hpp>
7 #endif
8 #include <boost/system/system_error.hpp>
9 #include <boost/throw_exception.hpp>
10 
11 namespace Si
12 {
13  inline void throw_last_error()
14  {
15  boost::throw_exception(boost::system::system_error(get_last_error()));
16  }
17 }
18 
19 #endif
Definition: absolute_path.hpp:19
void throw_last_error()
Definition: throw_last_error.hpp:13
SILICIUM_USE_RESULT boost::system::error_code get_last_error()
Definition: get_last_error.hpp:16