Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XmlGetAttribute returns S_FALSE, not E_NOTFOUND #4910

Open
wixbot opened this issue Sep 27, 2015 · 4 comments
Open

XmlGetAttribute returns S_FALSE, not E_NOTFOUND #4910

wixbot opened this issue Sep 27, 2015 · 4 comments
Assignees
Labels
breaking change Must happen in a .0 major release bug nativesdk

Comments

@wixbot
Copy link

wixbot commented Sep 27, 2015

Related issue

Issue for the initial "Safe" modifications to evaluate the return values properly.

Originally opened by jchoover

@wixbot
Copy link
Author

wixbot commented Sep 29, 2015

Release changed from v3.x to v4.x

@barnson
Copy link
Member

barnson commented Dec 22, 2020

http://lists.wixtoolset.org/pipermail/wix-devs-wixtoolset.org/2015-October/000132.html provides one reason that S_FALSE isn't entirely evil.

@barnson barnson modified the milestones: v4.x, v4.0 Dec 22, 2020
@rseanhall rseanhall added the breaking change Must happen in a .0 major release label Dec 22, 2020
@barnson barnson modified the milestones: v4.0, v.Next Jul 8, 2021
@jchoover
Copy link

jchoover commented Jul 8, 2021

This still doesn't jive with the behaviors of XmlGetAttribute vs XmlGetAttributeEx.

XmlGetAttributeEx translates S_FALSE to E_NOTFOUND.

XmlGetAttribute does not, and returns S_FALSE.

Since XmlGetAttributeNumber calls XmlGetAttributeNumberBase which calls XmlGetAttribute, then there is probably a bug here
https://github.com/wixtoolset/wix4/blob/develop/src/burn/engine/container.cpp#L62

@rseanhall
Copy link
Contributor

I added the ExitOnOptionalXmlQueryFailure and ExitOnRequiredXmlQueryFailure macros in wixtoolset/wix#11 which should abstract away whether S_FALSE or E_NOTFOUND is returned. We can start incrementally using those instead of flipping the switch all at once.

We should fix the example you gave, but I don't think it's a big deal since it's parsing XML that the core toolset created.

@barnson barnson removed this from the v.Future milestone May 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change Must happen in a .0 major release bug nativesdk
Projects
None yet
Development

No branches or pull requests

4 participants