From 1f57a3f457f60b4a1bfdc76b47f5e14044ec5f2c Mon Sep 17 00:00:00 2001 From: Bob Arnson Date: Mon, 6 Jan 2020 20:38:12 -0500 Subject: Add special handling for numeric Error ids. --- .../Bind/CreateOutputFromIRCommand.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/WixToolset.Core.WindowsInstaller') diff --git a/src/WixToolset.Core.WindowsInstaller/Bind/CreateOutputFromIRCommand.cs b/src/WixToolset.Core.WindowsInstaller/Bind/CreateOutputFromIRCommand.cs index 75eee3b6..16517e91 100644 --- a/src/WixToolset.Core.WindowsInstaller/Bind/CreateOutputFromIRCommand.cs +++ b/src/WixToolset.Core.WindowsInstaller/Bind/CreateOutputFromIRCommand.cs @@ -100,6 +100,10 @@ namespace WixToolset.Core.WindowsInstaller.Bind this.AddEnvironmentTuple((EnvironmentTuple)tuple, output); break; + case TupleDefinitionType.Error: + this.AddErrorTuple((ErrorTuple)tuple, output); + break; + case TupleDefinitionType.Feature: this.AddFeatureTuple((FeatureTuple)tuple, output); break; @@ -488,6 +492,14 @@ namespace WixToolset.Core.WindowsInstaller.Bind row[3] = tuple.ComponentRef; } + private void AddErrorTuple(ErrorTuple tuple, WindowsInstallerData output) + { + var table = output.EnsureTable(this.TableDefinitions["Error"]); + var row = table.CreateRow(tuple.SourceLineNumbers); + row[0] = Convert.ToInt32(tuple.Id.Id); + row[1] = tuple.Message; + } + private void AddFeatureTuple(FeatureTuple tuple, WindowsInstallerData output) { var attributes = tuple.DisallowAbsent ? WindowsInstallerConstants.MsidbFeatureAttributesUIDisallowAbsent : 0; -- cgit v1.2.3-55-g6feb