[Quantproject-developers] QuantProject/b4_Business/a07_DataProviders HistoricalBarProvider.cs, 1.1,
Brought to you by:
glauco_1
|
From: Glauco S. <gla...@us...> - 2008-11-18 23:01:43
|
Update of /cvsroot/quantproject/QuantProject/b4_Business/a07_DataProviders In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv9474/b4_Business/a07_DataProviders Modified Files: HistoricalBarProvider.cs Log Message: TickerNotExchangedException was never thrown in the previous revision Index: HistoricalBarProvider.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b4_Business/a07_DataProviders/HistoricalBarProvider.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** HistoricalBarProvider.cs 8 Nov 2008 20:25:21 -0000 1.1 --- HistoricalBarProvider.cs 18 Nov 2008 23:01:28 -0000 1.2 *************** *** 19,26 **** 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; using QuantProject.Data.DataProviders.Bars.Caching; --- 19,27 ---- 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; + using QuantProject.Data.DataProviders.Bars; using QuantProject.Data.DataProviders.Bars.Caching; *************** *** 46,51 **** DateTime dateTime ) { ! double marketValue = this.historicalBarProvider.GetMarketValue( ticker , dateTime ); return marketValue; } --- 47,61 ---- DateTime dateTime ) { ! double marketValue = double.MinValue; ! try ! { ! marketValue = this.historicalBarProvider.GetMarketValue( ticker , dateTime ); + } + catch( MissingBarException missingBarException ) + { + string forBreakPoint = missingBarException.Message; forBreakPoint += " "; + throw new TickerNotExchangedException( ticker , dateTime ); + } return marketValue; } |