diff options
| author | Bob Arnson <bob@firegiant.com> | 2020-06-10 21:38:18 -0400 |
|---|---|---|
| committer | Bob Arnson <bob@firegiant.com> | 2020-06-10 21:39:48 -0400 |
| commit | 9ebc094931aa473136c56c095a1170948f481f2e (patch) | |
| tree | a0b550084720962ad39e79633570c328cfdf6073 /src/WixToolset.Data/IntermediateTuple.cs | |
| parent | eecd0353a70e74f2776c25f8b89e86f08c013168 (diff) | |
| download | wix-9ebc094931aa473136c56c095a1170948f481f2e.tar.gz wix-9ebc094931aa473136c56c095a1170948f481f2e.tar.bz2 wix-9ebc094931aa473136c56c095a1170948f481f2e.zip | |
Add error message when tuple can't be found.
Diffstat (limited to 'src/WixToolset.Data/IntermediateTuple.cs')
| -rw-r--r-- | src/WixToolset.Data/IntermediateTuple.cs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/WixToolset.Data/IntermediateTuple.cs b/src/WixToolset.Data/IntermediateTuple.cs index 8a5858ee..9146b2be 100644 --- a/src/WixToolset.Data/IntermediateTuple.cs +++ b/src/WixToolset.Data/IntermediateTuple.cs | |||
| @@ -165,7 +165,12 @@ namespace WixToolset.Data | |||
| 165 | var id = (idJson == null) ? null : Identifier.Deserialize(idJson); | 165 | var id = (idJson == null) ? null : Identifier.Deserialize(idJson); |
| 166 | var sourceLineNumbers = (sourceLineNumbersJson == null) ? null : SourceLineNumber.Deserialize(sourceLineNumbersJson); | 166 | var sourceLineNumbers = (sourceLineNumbersJson == null) ? null : SourceLineNumber.Deserialize(sourceLineNumbersJson); |
| 167 | 167 | ||
| 168 | creator.TryGetTupleDefinitionByName(definitionName, out var definition); // TODO: this isn't sufficient. | 168 | // TODO: this isn't sufficient. |
| 169 | if (!creator.TryGetTupleDefinitionByName(definitionName, out var definition)) | ||
| 170 | { | ||
| 171 | throw new WixException(ErrorMessages.UnknownSymbolType(definitionName)); | ||
| 172 | } | ||
| 173 | |||
| 169 | var tuple = definition.CreateTuple(sourceLineNumbers, id); | 174 | var tuple = definition.CreateTuple(sourceLineNumbers, id); |
| 170 | 175 | ||
| 171 | for (var i = 0; i < fieldsJson.Count && i < tuple.Fields.Length; ++i) | 176 | for (var i = 0; i < fieldsJson.Count && i < tuple.Fields.Length; ++i) |
