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
This commit is contained in:
FeRD (Frank Dana)
2021-01-02 15:28:50 -05:00
parent 2563c3c61b
commit 77229147de

View File

@@ -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
{