Nix/src
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
..
build-remote Allow dynamic derivation deps in inputDrvs 2023-09-07 10:39:37 -04:00
libcmd Separate SystemError from SysError 2024-01-12 12:00:33 -05:00
libexpr Restore ambiguous value printer for nix-instantiate 2024-01-11 16:34:36 -08:00
libfetchers Merge pull request #9736 from obsidiansystems/mingw-makefiles 2024-01-11 10:58:55 -05:00
libmain Use buildprefix in a few more places 2023-11-29 19:49:07 -05:00
libstore Separate SystemError from SysError 2024-01-12 12:00:33 -05:00
libutil Separate SystemError from SysError 2024-01-12 12:00:33 -05:00
nix Separate SystemError from SysError 2024-01-12 12:00:33 -05:00
nix-build Separate SystemError from SysError 2024-01-12 12:00:33 -05:00
nix-channel Split up util.{hh,cc} 2023-11-05 12:20:02 -05:00
nix-collect-garbage Split up util.{hh,cc} 2023-11-05 12:20:02 -05:00
nix-copy-closure Restrict some code to StoreDirConfig 2023-11-04 19:05:36 -04:00
nix-env Restore ambiguous value printer for nix-instantiate 2024-01-11 16:34:36 -08:00
nix-instantiate Restore ambiguous value printer for nix-instantiate 2024-01-11 16:34:36 -08:00
nix-store Organize content addressing, use SourceAccessor with Store::addToStore 2023-12-18 10:41:54 -05:00
resolve-system-dependencies Remove FormatOrString and remaining uses of format() 2023-03-02 15:57:54 +01:00
toml11 Replace cpptoml with toml11 2021-12-17 22:03:33 +01:00