I'm not confusing preprocessor extension with compiler extension. I'm trying to 
throw a politer error.
Consider an unsupported function:
 $(acmeCo.DoesNotExist("Hello"))

In the preprocessor implementation it throws an exception (e.g. 
ArgumentException) you get a message similar to:
Error   7       In the preprocessor extension that handles prefix 'acmeCo' 
while trying to call function 'DoesNotExist("Hello")' and exception has 
occurred : Invalid Function Name: DoesNotExist

Now, the idea is that if it could throw:
throw new WixException(WixErrors.InvalidPreprocessorFunction(lineNumber, 
function));
instead. The error message might be a bit cleaner.

But, alas, no line number collection.

The Preprocessor.GetSourceLineNumbers doesn't work because the preprocessor 
extension doesn't get the XmlNode. (Or it's hiding somewhere I haven't seen).



Date: Tue, 31 Aug 2010 05:13:13 -0700 (PDT)
From: Nick Ramirez <nickra...@hotmail.com>
Subject: Re: [WiX-users] Preprocessor Extension question
To: wix-users@lists.sourceforge.net
Message-ID: <1283256793610-5482348.p...@n2.nabble.com>
Content-Type: text/plain; charset=us-ascii


There's a static method called Preprocessor.GetSourceLineNumbers that accepts
an XmlNode object. It's used by WiX as Candle is looking through your
markup. I'm not sure that you'll be able to use it very easily. If you don't
mind my asking, what is it you're trying to achieve? Preprocessor extensions
don't have elements that need to be parsed. Do you instead mean to say that
you're creating a compiler extension?
--
View this message in context: 
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Preprocessor-Extension-question-tp5480707p5482348.html
Sent from the wix-users mailing list archive at Nabble.com.

_____________________________________________
From:   Maillet, Ed
Sent:   Monday, August 30, 2010 8:14 PM
To:     'wix-users@lists.sourceforge.net'
Subject:        Preprocessor Extension question

When writing a preprocessor extension, how can you get 
SourceLineNumberCollection inside the extension? It isn't in the base class or 
Core that I can find.


----- Ed



------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to