Browse Source

Fix "Unhandled exception when installing packed addin with incorrect .addin file" (http://community.sharpdevelop.net/forums/t/11807.aspx)

pull/1/head
Daniel Grunwald 15 years ago
parent
commit
748caff645
  1. 4
      src/Main/Core/Project/Src/AddInTree/AddIn/AddIn.cs

4
src/Main/Core/Project/Src/AddInTree/AddIn/AddIn.cs

@ -267,6 +267,7 @@ namespace ICSharpCode.Core @@ -267,6 +267,7 @@ namespace ICSharpCode.Core
public static AddIn Load(TextReader textReader, string hintPath)
{
try {
AddIn addIn = new AddIn();
using (XmlTextReader reader = new XmlTextReader(textReader)) {
while (reader.Read()){
@ -283,6 +284,9 @@ namespace ICSharpCode.Core @@ -283,6 +284,9 @@ namespace ICSharpCode.Core
}
}
return addIn;
} catch (XmlException ex) {
throw new AddInLoadException(ex.Message, ex);
}
}
public static AddIn Load(string fileName)

Loading…
Cancel
Save