Core: better error handling for interpolation bug
The fix for the interpolation bug (!125 (merged)) has resulted in a cascade of error handling all the way down to the GUI. The rather than throwing an exception from InterpolatedStateList::interpolate
, it may be a better idea to avoid reaching the point where an exception is thrown.
Currently, the code interpolates between a given instrument state for frame n and the state for frame n+1, regardless of whether frame n+1 exists. The thrown exception could be replaced by a member constant that records the total number of states for the data set and ensures that we do not try to interpolate in a non-existent range.
However, this would require a sensible way of handling the Mth frame of a data set containing M frames.
Note that extrapolation is not allowed.