diff options
| author | Rob Mensching <rob@firegiant.com> | 2020-06-17 12:11:17 -0700 |
|---|---|---|
| committer | Rob Mensching <rob@firegiant.com> | 2020-06-23 02:10:31 -0700 |
| commit | 099a5bc83bfde2a713a94d47e613dba16fdcee2a (patch) | |
| tree | bb921277cffe5424d3e6166547b3284d76b20830 | |
| parent | 457c144720964a7f50b1d184e6b19faa930e970e (diff) | |
| download | wix-099a5bc83bfde2a713a94d47e613dba16fdcee2a.tar.gz wix-099a5bc83bfde2a713a94d47e613dba16fdcee2a.tar.bz2 wix-099a5bc83bfde2a713a94d47e613dba16fdcee2a.zip | |
Introduce Message attribute to remove Error inner text
| -rw-r--r-- | src/WixToolset.Core/Compiler.cs | 11 | ||||
| -rw-r--r-- | src/test/WixToolsetTest.CoreIntegration/TestData/ErrorsInUI/PackageComponents.wxs | 6 |
2 files changed, 12 insertions, 5 deletions
diff --git a/src/WixToolset.Core/Compiler.cs b/src/WixToolset.Core/Compiler.cs index ae7f7624..d6c96b28 100644 --- a/src/WixToolset.Core/Compiler.cs +++ b/src/WixToolset.Core/Compiler.cs | |||
| @@ -5358,6 +5358,7 @@ namespace WixToolset.Core | |||
| 5358 | { | 5358 | { |
| 5359 | var sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); | 5359 | var sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); |
| 5360 | var id = CompilerConstants.IntegerNotSet; | 5360 | var id = CompilerConstants.IntegerNotSet; |
| 5361 | string message = null; | ||
| 5361 | 5362 | ||
| 5362 | foreach (var attrib in node.Attributes()) | 5363 | foreach (var attrib in node.Attributes()) |
| 5363 | { | 5364 | { |
| @@ -5368,6 +5369,9 @@ namespace WixToolset.Core | |||
| 5368 | case "Id": | 5369 | case "Id": |
| 5369 | id = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, Int16.MaxValue); | 5370 | id = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, Int16.MaxValue); |
| 5370 | break; | 5371 | break; |
| 5372 | case "Message": | ||
| 5373 | message = this.Core.GetAttributeValue(sourceLineNumbers, attrib, EmptyRule.CanBeEmpty); | ||
| 5374 | break; | ||
| 5371 | default: | 5375 | default: |
| 5372 | this.Core.UnexpectedAttribute(node, attrib); | 5376 | this.Core.UnexpectedAttribute(node, attrib); |
| 5373 | break; | 5377 | break; |
| @@ -5385,13 +5389,18 @@ namespace WixToolset.Core | |||
| 5385 | id = CompilerConstants.IllegalInteger; | 5389 | id = CompilerConstants.IllegalInteger; |
| 5386 | } | 5390 | } |
| 5387 | 5391 | ||
| 5392 | if (String.IsNullOrEmpty(message)) | ||
| 5393 | { | ||
| 5394 | message = Common.GetInnerText(node); | ||
| 5395 | } | ||
| 5396 | |||
| 5388 | this.Core.ParseForExtensionElements(node); | 5397 | this.Core.ParseForExtensionElements(node); |
| 5389 | 5398 | ||
| 5390 | if (!this.Core.EncounteredError) | 5399 | if (!this.Core.EncounteredError) |
| 5391 | { | 5400 | { |
| 5392 | this.Core.AddTuple(new ErrorTuple(sourceLineNumbers, new Identifier(AccessModifier.Public, id)) | 5401 | this.Core.AddTuple(new ErrorTuple(sourceLineNumbers, new Identifier(AccessModifier.Public, id)) |
| 5393 | { | 5402 | { |
| 5394 | Message = Common.GetInnerText(node) | 5403 | Message = message |
| 5395 | }); | 5404 | }); |
| 5396 | } | 5405 | } |
| 5397 | } | 5406 | } |
diff --git a/src/test/WixToolsetTest.CoreIntegration/TestData/ErrorsInUI/PackageComponents.wxs b/src/test/WixToolsetTest.CoreIntegration/TestData/ErrorsInUI/PackageComponents.wxs index c9c65fc7..88a4ac81 100644 --- a/src/test/WixToolsetTest.CoreIntegration/TestData/ErrorsInUI/PackageComponents.wxs +++ b/src/test/WixToolsetTest.CoreIntegration/TestData/ErrorsInUI/PackageComponents.wxs | |||
| @@ -2,10 +2,8 @@ | |||
| 2 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"> | 2 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"> |
| 3 | <Fragment> | 3 | <Fragment> |
| 4 | <UI> | 4 | <UI> |
| 5 | <Error Id="1234"> | 5 | <Error Id="1234" Message="Category 55 Emergency Doomsday Crisis" /> |
| 6 | Category 55 Emergency Doomsday Crisis | 6 | <Error Id="5678" Message=" " /> |
| 7 | </Error> | ||
| 8 | <Error Id="5678"><![CDATA[ ]]></Error> | ||
| 9 | </UI> | 7 | </UI> |
| 10 | <ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER"> | 8 | <ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER"> |
| 11 | <Component> | 9 | <Component> |
