[PR #7576] Add serialization error handling to settings projection layer #26948

Closed
opened 2026-01-31 09:19:04 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/7576

State: closed
Merged: Yes


Now that CascadiaSettings is a WinRT object, we need to update the error
handling a bit. Making it a WinRT object limits our errors to be
hresults. So we moved all the error handling down a layer to when we
load the settings object.

  • Warnings encountered during validation are saved to Warnings().
  • Errors encountered during validation are saved to GetLoadingError().
  • Deserialization errors (mainly from JsonUtils) are saved to
    GetSerializationErrorMessage().

References

#7141 - CascadiaSettings is a settings object
#885 - this makes ripping out CascadiaSettings into
TerminalSettingsModel much easier

Validation Steps Performed

  • Tests passed
  • Deployment succeeded
    • tested with invalid JSON (deserialization error)
    • tested with missing DefaultProfile (validation error)
**Original Pull Request:** https://github.com/microsoft/terminal/pull/7576 **State:** closed **Merged:** Yes --- Now that CascadiaSettings is a WinRT object, we need to update the error handling a bit. Making it a WinRT object limits our errors to be hresults. So we moved all the error handling down a layer to when we load the settings object. - Warnings encountered during validation are saved to `Warnings()`. - Errors encountered during validation are saved to `GetLoadingError()`. - Deserialization errors (mainly from JsonUtils) are saved to `GetSerializationErrorMessage()`. ## References #7141 - CascadiaSettings is a settings object #885 - this makes ripping out CascadiaSettings into TerminalSettingsModel much easier ## Validation Steps Performed * [x] Tests passed - [x] Deployment succeeded - tested with invalid JSON (deserialization error) - tested with missing DefaultProfile (validation error)
claunia added the pull-request label 2026-01-31 09:19:04 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#26948