diff options
Diffstat (limited to 'src/linker/Linker.Steps/BodySubstituterStep.cs')
-rw-r--r-- | src/linker/Linker.Steps/BodySubstituterStep.cs | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/linker/Linker.Steps/BodySubstituterStep.cs b/src/linker/Linker.Steps/BodySubstituterStep.cs index 17cab82e1..abcc5d64c 100644 --- a/src/linker/Linker.Steps/BodySubstituterStep.cs +++ b/src/linker/Linker.Steps/BodySubstituterStep.cs @@ -37,11 +37,7 @@ namespace Mono.Linker.Steps if (!string.IsNullOrEmpty (_resourceName) && Context.IgnoreSubstitutions) return; - try { - ReadSubstitutions (_document); - } catch (Exception ex) when (!(ex is XmlResolutionException)) { - throw new XmlResolutionException ($"Failed to process XML substitution: '{_xmlDocumentLocation}'", ex); - } + ReadSubstitutions (_document); } bool ShouldProcessSubstitutions (XPathNavigator nav) @@ -52,12 +48,12 @@ namespace Mono.Linker.Steps var value = GetAttribute (nav, "featurevalue"); if (string.IsNullOrEmpty (value)) { - Context.LogMessage (MessageContainer.CreateErrorMessage ($"Feature {feature} does not specify a \"featurevalue\" attribute", 1001)); + Context.LogMessage (MessageContainer.CreateErrorMessage ($"Failed to process XML substitution: '{_xmlDocumentLocation}'. Feature {feature} does not specify a 'featurevalue' attribute", 1001)); return false; } if (!bool.TryParse (value, out bool bValue)) { - Context.LogMessage (MessageContainer.CreateErrorMessage ($"Unsupported non-boolean feature definition {feature}", 1002)); + Context.LogMessage (MessageContainer.CreateErrorMessage ($"Failed to process XML substitution: '{_xmlDocumentLocation}'. Unsupported non-boolean feature definition {feature}", 1002)); return false; } |