Made CXMLReader.OpenFile private so factory method has to be used
This commit is contained in:
1 parent
78870ae26d
commit
13e856db16
9 files changed
+33
-131
No files matched your search
@@ -9,7 +9,8 @@ namespace Vocaluxe.Menu
|
||||
{
|
||||
private XPathNavigator _Navigator;
|
||||
|
||||
public CXMLReader(string uri)
|
||||
//Private method. Use OpenFile factory method to get an instance
|
||||
private CXMLReader(string uri)
|
||||
{
|
||||
XPathDocument xPathDoc = new XPathDocument(uri);
|
||||
_Navigator = xPathDoc.CreateNavigator();
|
||||
@@ -26,9 +27,9 @@ namespace Vocaluxe.Menu
|
||||
{
|
||||
return new CXMLReader(sUri);
|
||||
}
|
||||
catch (Exception)
|
||||
catch (Exception e)
|
||||
{
|
||||
CBase.Log.LogError("Can't open XML file: " + sUri);
|
||||
CBase.Log.LogError("Can't open XML file: " + sUri + ": " + e.Message);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user