[wix-devs] wix4: Handling invalid ids

Hoover, Jacob Jacob.Hoover at greenheck.com
Wed Jan 4 07:27:19 PST 2017


If the identifier is invalid, should we allow the build to continue? IE, should this be a warning or an error. Returning a special identifier that has to be checked before use is no better than returning a null and checking for it.

-----Original Message-----
From: wix-devs [mailto:wix-devs-bounces at lists.wixtoolset.org] On Behalf Of Bob Arnson
Sent: Tuesday, January 03, 2017 12:49 PM
To: WiX Toolset Developer Mailing List <wix-devs at lists.wixtoolset.org>
Subject: [wix-devs] wix4: Handling invalid ids

I opened https://github.com/wixtoolset/issues/issues/5464 when I was finding and fixing the wix4 unit tests (see https://github.com/wixtoolset/wix4/pull/224). What happens is that CompilerCore.GetAttributeIdentifier returns null if the id isn't valid and other Parse* methods use it before checking for a null Id (to generate one, usually). I'm thinking that CompilerCore.GetAttributeIdentifier should throw a warning itself and return a special InvalidIdentifier that's a legal object but distinguishable as invalid for reporting. Anyone have a different suggestion?
____________________________________________________________________
WiX Toolset Developer Mailing List provided by FireGiant http://www.firegiant.com/


More information about the wix-devs mailing list