Comments (5)
RoOriginateErrorInformation's documentation doesn't seem to say that it resets the error info. The implementation respects RO_ERROR_REPORTING_SUPPRESSSETERRORINFO
and RO_ERROR_REPORTING_USESETERRORINFO
flags to RoSetErrorReportingFlags ... the logic for when RoOriginate... calls SetErrorInfo appears to be like this:
if (FlagNotSet(RoErrorFlags, RO_ERROR_REPORTING_SUPPRESSSETERRORINFO))
{
if (FlagSet(RoErrorFlags, RO_ERROR_REPORTING_USESETERRORINFO) || IsDebuggerPresent())
{
SetErrorInfo(...);
}
}
There's other paths through RoOriginateLanguageException that would cause the call to SetErrorInfo to be skipped. I'm inclined to fix up this path against "could not get the extended error info" as that's not really a developer problem as much as an environmental problem.
@ChrisGuzak can you grab a time-travel trace of the test you've got so we can see what's happening?
from cppwinrt.
Adding @manodasanW as I think he originally owned/wrote the origination APIs.
from cppwinrt.
Looks like the hresult_error
case handles this properly:
Lines 217 to 221 in 2511bf7
While the originate
path does not:
Lines 315 to 318 in 2511bf7
And worse, the originate
path is triggered in the "the current info does not implement IRestrictedErrorInfo" case of the hresult_error
ctor.
I'd expect that this is a bad assumption on C++/WinRT's part - there's certainly runtimes that will SetErrorInfo(pCustomErrorInfo)
that does not implement IRestrictedErrorInfo
so we should harden the code with that in mind.
from cppwinrt.
The latter is preceded by a call to RoOriginateLanguageException
so that assertion should always hold.
from cppwinrt.
This issue is stale because it has been open 10 days with no activity. Remove stale label or comment or this will be closed in 5 days.
from cppwinrt.
Related Issues (20)
- Add to_u8string and to_hstring(std::u8string_view) functions HOT 4
- Nativs is not working on ARM64 HOT 2
- Feature request: Allow delegates consisting of weak reference + lambda
- Bug: TryLookup and Cancel cause noise in debugger because they RoOriginate an error that is expected HOT 1
- Project attributes as structures HOT 7
- Simply creating a projected type with added ref count HOT 1
- Expose IIterator<T> as a sentinel view HOT 1
- Generate empty module.g.cpp HOT 1
- Bug: Visual Studio integration? HOT 3
- Feature: Add support for agile+weak references HOT 1
- Bug: Upgrading from 2.0.221104.6 to a later version no longer builds co_await on a DispatcherQueue HOT 6
- Project interfaces without forwarders to required interfaces HOT 2
- Bug:Since 2.0.240111.5, I get a compile error with the GetTemplateChild function. HOT 5
- Expose wrapped APIs to open Win32 handles for WinRT storage items HOT 2
- GetChildrenInTabFocusOrder no longer a member of the generated code HOT 10
- Cannot use WinRT with MFC? HOT 3
- Bug: version 2.0.240111.5 does not work correctly with XAML HOT 10
- Bug:Build failure due to namespace changes in XamlTypeInfo after C++/WinRT update HOT 2
- Bug: throw_hresult should treat ERROR_COMMITMENT_LIMIT as OOM HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cppwinrt.