nix-super/src/libcmd
John Ericson 6208ca7209 Separate SystemError from SysError
Most of this is a `catch SysError` -> `catch SystemError` sed. This
is a rather pure-churn change I would like to get out of the way. **The
intersting part is `src/libutil/error.hh`.**

On Unix, we will only throw the `SysError` concrete class, which has
the same constructors that `SystemError` used to have.

On Windows, we will throw `WinError` *and* `SysError`. `WinError`
(which will be created in a later PR), will use a `DWORD` instead of
`int` error value, and `GetLastError()`, which is the Windows equivalent
of the `errno` machinery. Windows will *also* use `SysError` because
Window's "libc" (MSVCRT) implements the POSIX interface, and we use it
too.

As the docs describe, while we *throw* one of the 3 choices above (2
concrete classes or the alias), we should always *catch* `SystemError`.
This ensures no matter how the implementation changes for Windows (e.g.
between `SysError` and `WinError`) the catching logic stays the same
and stays correct.

Co-Authored-By volth <volth@volth.com>
Co-Authored-By Eugene Butler <eugene@eugene4.com>
2024-01-12 12:00:33 -05:00
..
built-path.cc use std::tie() for macro-generated operators 2023-12-19 19:32:16 +01:00
built-path.hh Merge pull request #6236 from obsidiansystems/store-dir-config 2023-12-01 15:38:14 +01:00
command-installable-value.cc Finish converting existing comments for internal API docs (#8146) 2023-04-07 13:55:28 +00:00
command-installable-value.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
command.cc Improve the error message for “multicommands” commands (#9510) 2023-12-06 13:13:45 +00:00
command.hh Improve the error message for “multicommands” commands (#9510) 2023-12-06 13:13:45 +00:00
common-eval-args.cc Document each store type on its own page 2023-12-01 01:27:52 +01:00
common-eval-args.hh libcmd: lookupFileArg(): add baseDir 2023-11-07 13:24:01 -05:00
editor-for.cc Combine AbstractPos, PosAdapter, and Pos 2024-01-08 10:59:41 -08:00
editor-for.hh Combine AbstractPos, PosAdapter, and Pos 2024-01-08 10:59:41 -08:00
installable-attr-path.cc Fixing #7479 2023-08-18 11:44:00 -04:00
installable-attr-path.hh Split up util.{hh,cc} 2023-11-05 12:20:02 -05:00
installable-derived-path.cc Fixing #7479 2023-08-18 11:44:00 -04:00
installable-derived-path.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
installable-flake.cc remove lazy-pos forceValue 2023-12-19 19:32:16 +01:00
installable-flake.hh Rename 'resolvedRef' to 'lockedRef' 2023-07-03 12:23:57 +02:00
installable-value.cc Combine AbstractPos, PosAdapter, and Pos 2024-01-08 10:59:41 -08:00
installable-value.hh Make more string values work as installables 2023-05-15 09:03:38 -04:00
installables.cc nix shell: reflect command line order in PATH order 2023-12-21 10:56:19 -08:00
installables.hh nix shell: reflect command line order in PATH order 2023-12-21 10:56:19 -08:00
legacy.cc Move command plugin interface to libnixcmd 2021-01-26 06:22:24 -05:00
legacy.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
local.mk Only link with -pthread on Unix 2024-01-10 20:38:39 -05:00
markdown.cc Make lowdown optional 2024-01-08 20:37:42 +01:00
markdown.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
nix-cmd.pc.in Fix building with GCC 9 2023-02-10 18:38:57 +01:00
repl.cc Separate SystemError from SysError 2024-01-12 12:00:33 -05:00
repl.hh Clean up SearchPath 2023-07-09 23:22:22 -04:00