|
ui-utilcpp
1.10.0
|
Namespace for system/library calls. More...
Data Structures | |
| class | Exception |
| Use this exception class if you want to catch failures on system/library calls. More... | |
Functions | |
| uid_t | fsidFromProcfs (pid_t const pid, std::string const &lineId) |
Namespace for system/library calls.
If you use a call that matches any of the points above, please include a wrapper here.
Call any of the wrapper somewhere in your code:
... myStr = getPath(); UI::Util::Sys::remove(myStr); // as usual, assume success ...
Somewhere in your context-specific exception handler:
...
catch (UI::Util::Sys::Exception const & e)
{
std::cerr << "System error : " << e.what() << std::endl;
std::cerr << "Errno error code was: " << e.getCode() << std::endl;
std::cerr << "Exception debug : " << e.getDebug() << std::endl;
}
...
1.8.17