public static LoomProject Load(string path) { ProjectReader reader = new LoomProjectReader(path); try { return reader.ReadProject() as LoomProject; } catch (System.Xml.XmlException exception) { string format = string.Format("Error in XML Document line {0}, position {1}.", exception.LineNumber, exception.LinePosition); throw new Exception(format, exception); } finally { reader.Close(); } }
public static LoomProject Load(string path) { ProjectReader reader = new LoomProjectReader(path); try { return(reader.ReadProject() as LoomProject); } catch (System.Xml.XmlException exception) { string format = string.Format("Error in XML Document line {0}, position {1}.", exception.LineNumber, exception.LinePosition); throw new Exception(format, exception); } finally { reader.Close(); } }