Convert THROW_IF_NULL_ALLOC for input parameters to return E_INVALIDARG not E_OUTOFMEMORY. #5753

Closed
opened 2026-01-31 00:20:49 +00:00 by claunia · 0 comments
Owner

Originally created by @miniksa on GitHub (Jan 2, 2020).

This isn't exactly correct, it'll result in a hresult exception E_OUTOFMEMORY or whatever. It's really more of an invalid parameter, but also it's more of a "we could avoid the throwing constructor completely" case?

Originally posted by @DHowett-MSFT in https://github.com/microsoft/terminal/pull/4005

I had said we should bulk do this all over the codebase.

Originally created by @miniksa on GitHub (Jan 2, 2020). This isn't exactly correct, it'll result in a hresult exception `E_OUTOFMEMORY` or whatever. It's really more of an invalid parameter, but also it's more of a "we could avoid the throwing constructor completely" case? _Originally posted by @DHowett-MSFT in https://github.com/microsoft/terminal/pull/4005_ I had said we should bulk do this all over the codebase.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#5753