From 77229147dea8a13d79f318eec0c765ee3eba0970 Mon Sep 17 00:00:00 2001 From: "FeRD (Frank Dana)" Date: Sat, 2 Jan 2021 15:28:50 -0500 Subject: [PATCH] Restore (unused) TooManySeeks exception, deprecate To avoid API changes, we should phase the deprecation of TooManySeeks in case external callers are catching it. But it remains unused in the code, and should be considered deprecated. Add a deprecation message instead. Exceptions: Exclude TooManySeeks from SWIG --- src/Exceptions.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/Exceptions.h b/src/Exceptions.h index 9cced313..258c6f4a 100644 --- a/src/Exceptions.h +++ b/src/Exceptions.h @@ -365,6 +365,29 @@ namespace openshot { virtual ~ResampleError() noexcept {} }; +#define TMS_DEP_MSG "The library no longer throws this exception. It will be removed in a future release." + +#ifndef SWIG + /// Exception when too many seek attempts happen + class + __attribute__ ((deprecated (TMS_DEP_MSG) )) + TooManySeeks : public ExceptionBase + { + public: + std::string file_path; + /** + * @brief Constructor + * + * @param message A message to accompany the exception + * @param file_path (optional) The input file being processed + */ + TooManySeeks(std::string message, std::string file_path="") + __attribute__ ((deprecated (TMS_DEP_MSG) )) + : ExceptionBase(message), file_path(file_path) { } + virtual ~TooManySeeks() noexcept {} + }; +#endif + /// Exception when a writer is closed, and a frame is requested class WriterClosed : public ExceptionBase {