[Quantproject-developers] QuantProject/b1_ADT OutOfRangeException.cs, NONE, 1.1 ADT_SD.csproj, 1.5,
Brought to you by:
glauco_1
|
From: Marco M. <mi...@us...> - 2008-03-12 21:51:44
|
Update of /cvsroot/quantproject/QuantProject/b1_ADT In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv30900 Modified Files: ADT_SD.csproj b1_ADT.csproj Added Files: OutOfRangeException.cs Log Message: Added OutOfRangeException, the exception that should be thrown when a given number does not fit the expected range --- NEW FILE: OutOfRangeException.cs --- /* QuantProject - Quantitative Finance Library OutOfRangeException.cs Copyright (C) 2008 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.ADT { /// <summary> /// It should be thrown when a given number /// is out of the desired range /// </summary> public class OutOfRangeException : Exception { private double outOfRangeNumber; private double minimumForValidRange; private double maximumForValidRange; public override string Message { get { return this.outOfRangeNumber.ToString() + "is out of range! It should be between " + this.minimumForValidRange.ToString() + " and " + this.maximumForValidRange.ToString(); } } public OutOfRangeException( double outOfRangeNumber, double minimumForValidRange, double maximumForValidRange) { this.outOfRangeNumber = outOfRangeNumber; this.minimumForValidRange = minimumForValidRange; this.maximumForValidRange = maximumForValidRange; } } } Index: ADT_SD.csproj =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b1_ADT/ADT_SD.csproj,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ADT_SD.csproj 19 Jan 2008 18:19:54 -0000 1.5 --- ADT_SD.csproj 12 Mar 2008 21:51:34 -0000 1.6 *************** *** 53,56 **** --- 53,57 ---- <Compile Include="ExtendedDateTime.cs" /> <Compile Include="HashProvider.cs" /> + <Compile Include="OutOfRangeException.cs" /> <Compile Include="IProgressNotifier.cs" /> <Compile Include="Keyed.cs" /> Index: b1_ADT.csproj =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b1_ADT/b1_ADT.csproj,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** b1_ADT.csproj 19 Jan 2008 18:20:26 -0000 1.27 --- b1_ADT.csproj 12 Mar 2008 21:51:35 -0000 1.28 *************** *** 148,151 **** --- 148,156 ---- /> <File + RelPath = "OutOfRangeException.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "RecursiveHashtable.cs" SubType = "Code" |