This is an alternative to ErrorOr<T>::release_value() that can be used
when converting code to signal that we're releasing the value without
error propagation as a way to move forward now.
This makes these cases much easier to find later on, once more paths for
error propagation are available.
Before this, we only had ClientConnection::did_misbehave() to report an
error and shut the connection down. But it's not fair to say that *all*
errors are the client misbehaving! A typical non-misbehavior is resource
allocation failure on the server side.
The goal with these is to eventually replace AK::Result, KResult and
KResultOr<T> with something that works (and makes sense) in both kernel
and userspace.
This first cut of Error can be made from an errno code, or from a string
literal (StringView)
Long doubles are always at least 80 bits wide in memory and it suffices
if we can address these 80 bits, to mark the long double as NAN at the
end of an MMX instruction, so the additional magic using conditional
types is unnecessary.
Userland/Libraries/LibJS/Runtime/Temporal/PlainTime.cpp:283:24:
note: deduced conflicting types for parameter 'T' ('long long int'
and 'long int')
283 | nanosecond = modulo(nanosecond, 1000l);
| ~~~~~~^~~~~~~~~~~~~~~~~~~
Worked fine on x86_84 :yakshrug:
Two issues:
- The format string said "{:9}", which left-pads with spaces and not
zeros as required
- Even when correcting that, we were not accounting for step 11 b:
"Set fraction to the longest possible substring of fraction starting
at position 0 and not ending with the code unit 0x0030 (DIGIT ZERO)."
We can safely use trim() for that as the formatted string is known to
not contain only zeros (which would leave the left-most in place).
Also adds tests for "UTC" and various numeric offsets.
We're supposed to get the substring from `fraction`, which is guaranteed
to have the required length. `fraction_part` is the user-supplied value
and trying to get a substring view from 0-9 might crash.
This reverts commit 239520ae54.
The call to set_visible() is not redundant. Removing the call leads
to the "start" button in the taskbar not being painted as "pressed" even
when it is.