diff --git a/tf2/src/cache.cpp b/tf2/src/cache.cpp index 607fc1523..959788a65 100644 --- a/tf2/src/cache.cpp +++ b/tf2/src/cache.cpp @@ -122,9 +122,7 @@ uint8_t TimeCache::findClosest( // No values stored if (storage_.empty()) { - if (error_code) { - *error_code = TF2Error::TF2_NO_DATA_FOR_EXTRAPOLATION_ERROR; - } + cache::createExtrapolationException1(target_time, TimePoint(), error_str, error_code); return 0; }