[Quantproject-developers] QuantProject/b2_DataAccess EmptyQueryException.cs, NONE, 1.1 DataAccess_S
Brought to you by:
glauco_1
|
From: Marco M. <mi...@us...> - 2009-02-08 16:41:36
|
Update of /cvsroot/quantproject/QuantProject/b2_DataAccess In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv5219/b2_DataAccess Modified Files: DataAccess_SD.csproj Added Files: EmptyQueryException.cs Log Message: Added EmptyQueryException, that could be useful to throw when a given query on database doesn't return any row. Index: DataAccess_SD.csproj =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b2_DataAccess/DataAccess_SD.csproj,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** DataAccess_SD.csproj 30 Dec 2008 00:29:04 -0000 1.6 --- DataAccess_SD.csproj 8 Feb 2009 16:41:27 -0000 1.7 *************** *** 64,67 **** --- 64,68 ---- <Compile Include="DbCommandProvider.cs" /> <Compile Include="DbDataAdapterProvider.cs" /> + <Compile Include="EmptyQueryException.cs" /> <Compile Include="OleDbSingleTableAdapter.cs" /> <Compile Include="QuoteField.cs" /> --- NEW FILE: EmptyQueryException.cs --- /* QuantProject - Quantitative Finance Library EmptyQueryException.cs Copyright (C) 2009 Marco Milletti This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ using System; namespace QuantProject.DataAccess { /// <summary> /// It can be thrown when a query is launched, but no row is returned /// </summary> public class EmptyQueryException : Exception { private string sqlQuery; public override string Message { get { return "No row for this query: " + this.sqlQuery; } } public EmptyQueryException( string sqlQuery ) { this.sqlQuery = sqlQuery; } } } |