mirror of
https://github.com/NixOS/nix
synced 2025-06-25 14:51:16 +02:00
implement SysError errno handling
This commit is contained in:
parent
7ffb5efdbc
commit
e76ad2e48a
5 changed files with 21 additions and 19 deletions
|
@ -35,6 +35,14 @@ int main()
|
|||
logger->logEI(ei);
|
||||
}
|
||||
|
||||
// SysError; picks up errno
|
||||
try {
|
||||
auto x = readFile(-1);
|
||||
}
|
||||
catch (Error &e) {
|
||||
std::cout << "error: " << e.sname() << std::endl;
|
||||
logError(e.info());
|
||||
}
|
||||
|
||||
// For completeness sake, info through vomit levels.
|
||||
// But this is maybe a heavy format for those.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue