Remove C++ exceptions from SystemTimeFormatter and derived classes #45372
Mobile/Android (success)
Check has finished
Details
Check run finished (success ✔️)
The check run can be viewed here:
Mobile/Android (pr/45372/main@a9ee712)
Check started by
Request (pr/45372/main@a9ee712)
@yanavlasov
a9ee712 #45372
merge main@f1063bb
Remove C++ exceptions from SystemTimeFormatter and derived classes
Replace constructors that can throw with a factory method that returns StatusOr<> for SystemTimeFormatter and derived classes. There should be no functional changes, as there is still a throw present when a factory method fails.
Test changes are all conversions from direct construction to a factory method.
In the subsequent PRs I will generalize the makeTimeFormatter so it can be used with generic types.
There are boilerplate checkConstructPreconditions method in the derived classes that just call the base class. They are not strictly needed, and I have left them, just to so I can use this as pattern for agents that will work on implementing this pattern for other types where derived classes have their own preconditions.
Risk Level: low
Testing: unit tests
Docs Changes: no
Release Notes: no
Platform Specific Features: no
Environment
Request variables
| Key | Value |
|---|---|
| ref | 113228b |
| sha | a9ee712 |
| pr | 45372 |
| base-sha | f1063bb |
| actor | |
| message | Remove C++ exceptions from SystemTimeFormatter and derived classes... |
| started | 1780409327.34096 |
| target-branch | main |
| trusted | false |
Build image
Container image/s (as used in this CI run)
| Key | Value |
|---|---|
| default | docker.io/envoyproxy/envoy-build:v0.1.5 |
| mobile | docker.io/envoyproxy/envoy-build:mobile-v0.1.5 |
Version
Envoy version (as used in this CI run)
| Key | Value |
|---|---|
| major | 1 |
| minor | 39 |
| patch | 0 |
| dev | true |