[Quantproject-developers] QuantProject/b2_DataAccess DataBaseLocator.cs,1.2,1.3
Brought to you by:
glauco_1
|
From: Marco M. <mi...@us...> - 2005-06-24 22:36:05
|
Update of /cvsroot/quantproject/QuantProject/b2_DataAccess In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8383/b2_DataAccess Modified Files: DataBaseLocator.cs Log Message: An exception (managed) is now thrown when the Database specified in the Database.xml file doesn't exist on disk Index: DataBaseLocator.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b2_DataAccess/DataBaseLocator.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** DataBaseLocator.cs 11 Jan 2004 19:07:44 -0000 1.2 --- DataBaseLocator.cs 24 Jun 2005 22:35:56 -0000 1.3 *************** *** 58,68 **** //gets full path of the file that contains the database this.Path = xmlTextReader.GetAttribute(0); } } xmlTextReader.Close(); stream.Close(); ! ! ! } catch (Exception ex) --- 58,69 ---- //gets full path of the file that contains the database this.Path = xmlTextReader.GetAttribute(0); + if(!File.Exists(this.path)) + throw new Exception("Specified file in DataBase.xml doesn't exist!\n" + + "Delete Database.xml and retry!"); } } xmlTextReader.Close(); stream.Close(); ! } catch (Exception ex) |