lix/tests/unit/libutil
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
..
data/git Move tests to separate directories, and document 2023-12-01 10:48:58 -05:00
args.cc Move tests to separate directories, and document 2023-12-01 10:48:58 -05:00
canon-path.cc Move tests to separate directories, and document 2023-12-01 10:48:58 -05:00
chunked-vector.cc Move tests to separate directories, and document 2023-12-01 10:48:58 -05:00
closure.cc Move tests to separate directories, and document 2023-12-01 10:48:58 -05:00
compression.cc Move tests to separate directories, and document 2023-12-01 10:48:58 -05:00
config.cc Move tests to separate directories, and document 2023-12-01 10:48:58 -05:00
git.cc HashType: Rename to HashAlgorithm 2023-12-06 23:43:42 +01:00
hash.cc Renamed HashFormat::Base32 to HashFormat::Nix32 2023-12-06 23:43:42 +01:00
hilite.cc Move tests to separate directories, and document 2023-12-01 10:48:58 -05:00
json-utils.cc Move tests to separate directories, and document 2023-12-01 10:48:58 -05:00
local.mk Move tests to separate directories, and document 2023-12-01 10:48:58 -05:00
logging.cc Separate SystemError from SysError 2024-01-12 12:00:33 -05:00
lru-cache.cc Move tests to separate directories, and document 2023-12-01 10:48:58 -05:00
pool.cc Move tests to separate directories, and document 2023-12-01 10:48:58 -05:00
references.cc Move tests to separate directories, and document 2023-12-01 10:48:58 -05:00
suggestions.cc Move tests to separate directories, and document 2023-12-01 10:48:58 -05:00
tests.cc Move tests to separate directories, and document 2023-12-01 10:48:58 -05:00
url.cc isValidSchemeName: Use regex 2023-12-12 17:46:34 +01:00
xml-writer.cc Move tests to separate directories, and document 2023-12-01 10:48:58 -05:00