diff options
| author | Rob Mensching <rob@firegiant.com> | 2019-05-22 00:19:41 -0700 |
|---|---|---|
| committer | Rob Mensching <rob@firegiant.com> | 2019-05-23 15:43:40 -0700 |
| commit | 54541ef517190f37d0625627b028834f0871a959 (patch) | |
| tree | 91ff4d813d5013260c04854a9ad24812ccdffa08 /src/WixToolset.Data/IntermediateFieldValueExtensions.cs | |
| parent | 505fe69d85c90184cd37290ccb0120fec6074c20 (diff) | |
| download | wix-54541ef517190f37d0625627b028834f0871a959.tar.gz wix-54541ef517190f37d0625627b028834f0871a959.tar.bz2 wix-54541ef517190f37d0625627b028834f0871a959.zip | |
Implement many more strong tuples
Also fixes several warnings.
Diffstat (limited to 'src/WixToolset.Data/IntermediateFieldValueExtensions.cs')
| -rw-r--r-- | src/WixToolset.Data/IntermediateFieldValueExtensions.cs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/WixToolset.Data/IntermediateFieldValueExtensions.cs b/src/WixToolset.Data/IntermediateFieldValueExtensions.cs index 25a40ee6..f9322e09 100644 --- a/src/WixToolset.Data/IntermediateFieldValueExtensions.cs +++ b/src/WixToolset.Data/IntermediateFieldValueExtensions.cs | |||
| @@ -71,7 +71,14 @@ namespace WixToolset.Data | |||
| 71 | } | 71 | } |
| 72 | else if (value.Data is string s) | 72 | else if (value.Data is string s) |
| 73 | { | 73 | { |
| 74 | return Convert.ToInt32(s); | 74 | try |
| 75 | { | ||
| 76 | return Convert.ToInt32(s); | ||
| 77 | } | ||
| 78 | catch (FormatException) | ||
| 79 | { | ||
| 80 | throw new WixException(ErrorMessages.UnableToConvertFieldToNumber(s)); | ||
| 81 | } | ||
| 75 | } | 82 | } |
| 76 | 83 | ||
| 77 | return (int)value.Data; | 84 | return (int)value.Data; |
