1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-08 05:27:14 +09:00
Commit graph

7 commits

Author SHA1 Message Date
Timothy Flynn
95441dabd5 AK: Define some simple getters in a single line
This matches our coding style everywhere else. clang-format used to have
trouble with these, but it doesn't any longer.
2025-05-10 21:19:46 -04:00
Timothy Flynn
4f132b9e40 AK: Remove Error::from_string_view_or_print_error_and_return_errno
This was for use within Serenity's kernel. In Ladybird, it is just some
indirection to Error::from_string_view.
2025-05-10 21:19:46 -04:00
R-Goc
79b652c74e AK: Rework error types to store kind as an enum
This commit makes windows errors store the code instead of being a
formatted string literal. This will allow comparing against the error,
and checking what it is. The formatting is now done in the formatter,
and moved to an implementation file to avoid polluting headers with
windows.h. The kind of the error is now determined by an enum Kind which
will allow matching against the error kind.

Co-Authored-By: Andrew Kaster <andrew@ladybird.org>
2025-05-10 00:03:31 -06:00
stasoid
870cce9d11 AK: Add Error::from_windows_error(void)
Also slightly improve Error::from_windows_error(int)
2025-02-05 19:27:47 -07:00
Cameron Youell
94601e1ffd LibCore: Add Windows version of DirIterator
Co-authored-by: stasoid <stasoid@yahoo.com>
2024-10-19 18:14:48 -06:00
Tim Ledbetter
5ca2f4dfd7 Everywhere: Remove all KERNEL #defines 2024-06-18 09:36:25 +02:00
Liav A
ab27fce86f AK: Add a new method to propagate errno while printing errors in Kernel
This new method is meant to be used in both userspace and kernel code.
The idea is to allow printing of a verbose message and then returning an
errno code which is the proper mechanism for kernel code because we
should almost always assume that such error will be propagated back to
userspace in some way, so the userspace code could reasonably decode it.

For userspace code however, this new method is meant to be a simple
wrapper for Error::from_string_view, because for most invocations, it's
much more useful to have a verbose & literal error than a errno code, so
we simply ignore that errno code completely in such context.
2023-02-10 09:14:20 +00:00