mathpaquette / IQFeed.CSharpApiClient

IQFeed.CSharpApiClient is fastest and the most well-designed C# DTN IQFeed socket API connector available
MIT License
120 stars 43 forks source link

Added IqFeed data parse exceptions handling #97

Closed gribunin closed 3 years ago

gribunin commented 3 years ago

Added marshalling of parse exceptions to the client calling context, so that the client code can now catch these exceptions and make it's own processing, for example:

try {
   var intraDayTicks = (await lookupClient.Historical.GetHistoryTickDatapointsAsync(ticker, 1, 
          IQFeed.CSharpApiClient.Lookup.Historical.Enums.DataDirection.Newest)).ToArray();
} catch (IQFeed.CSharpApiClient.Common.Exceptions.NoDataIQFeedException) {
}
catch (IQFeed.CSharpApiClient.Common.Exceptions.BadDataIQFeedException) {
   // catching parse exceptions here
}