13 #ifndef OPENSHOT_EXCEPTIONS_H 14 #define OPENSHOT_EXCEPTIONS_H 34 virtual const char*
what() const noexcept {
36 return m_message.c_str();
54 ?
" at frame " + std::to_string(frame_number)
71 ?
" for file " + file_path
91 ChunkNotFound(std::string message, int64_t frame_number, int64_t chunk_number, int64_t chunk_frame)
92 :
FrameExceptionBase(message, frame_number), chunk_number(chunk_number), chunk_frame(chunk_frame) { }
278 (json.size() > 100 ?
" (abbreviated): " :
": ")
279 + json.substr(0, 99);
313 :
ExceptionBase(message), FrameRequested(frame_requested), MaxFrames(max_frames) { }
317 +
" Frame requested: " + std::to_string(FrameRequested)
318 +
" Max frames: " + std::to_string(MaxFrames));
337 :
ExceptionBase(message), PointRequested(point_requested), MaxPoints(max_points) { }
341 +
" Point requested: " + std::to_string(PointRequested)
342 +
" Max point: " + std::to_string(MaxPoints));
392 #define TMS_DEP_MSG "The library no longer throws this exception. It will be removed in a future release." 398 TooManySeeks :
public FileExceptionBase
408 TooManySeeks(std::string message, std::string file_path=
"")
409 : FileExceptionBase(message, file_path) { }
410 virtual ~TooManySeeks() noexcept {}
virtual std::string py_message() const override
virtual const char * what() const noexcept
OutOfBoundsFrame(std::string message, int64_t frame_requested, int64_t max_frames)
Constructor.
virtual ~InvalidCodec() noexcept
virtual ~ExceptionBase() noexcept
InvalidFile(std::string message, std::string file_path)
Constructor.
InvalidSampleRate(std::string message, std::string file_path="")
Constructor.
Exception when a required chunk is missing.
OutOfMemory(std::string message, std::string file_path="")
Constructor.
Exception when an invalid # of audio channels are detected.
ErrorEncodingVideo(std::string message, int64_t frame_number=-1)
Constructor.
Exception when encoding audio packet.
std::string py_message() const override
virtual ~InvalidFile() noexcept
virtual ~ResampleError() noexcept
std::string py_message() const override
ReaderClosed(std::string message, std::string file_path="")
Constructor.
virtual ~OutOfBoundsPoint() noexcept
virtual std::string py_message() const
InvalidJSONKey(std::string message, std::string json)
Constructor.
virtual ~ErrorEncodingVideo() noexcept
Exception when a reader is closed, and a frame is requested.
FileExceptionBase(std::string message, std::string file_path="")
Exception when encoding audio packet.
Exception when invalid sample rate is detected during encoding.
Exception for missing JSON Change key.
virtual ~InvalidJSONKey() noexcept
virtual ~InvalidSampleRate() noexcept
InvalidCodec(std::string message, std::string file_path="")
Constructor.
ResampleError(std::string message, std::string file_path="")
Constructor.
Exception when no valid codec is found for a file.
Exception when memory could not be allocated.
Exception when invalid encoding options are used.
Exception when accessing a blackmagic decklink card.
Exception when no streams are found in the file.
WriterClosed(std::string message, std::string file_path="")
Constructor.
virtual ~InvalidOptions() noexcept
Exception for files that can not be found or opened.
virtual ~OutOfBoundsFrame() noexcept
virtual ~ChunkNotFound() noexcept
InvalidJSON(std::string message, std::string file_path="")
Constructor.
virtual ~InvalidJSON() noexcept
virtual std::string py_message() const override
virtual ~InvalidChannels() noexcept
NoStreamsFound(std::string message, std::string file_path="")
Constructor.
Exception for frames that are out of bounds.
DecklinkError(std::string message)
Constructor.
virtual ~WriterClosed() noexcept
FrameExceptionBase(std::string message, int64_t frame_number=-1)
This namespace is the default namespace for all code in the openshot library.
virtual ~OutOfMemory() noexcept
Exception for invalid JSON.
InvalidChannels(std::string message, std::string file_path="")
Constructor.
Exception for an out of bounds key-frame point.
std::string py_message() const override
virtual ~ErrorEncodingAudio() noexcept
virtual ~DecklinkError() noexcept
Exception when decoding audio packet.
ChunkNotFound(std::string message, int64_t frame_number, int64_t chunk_number, int64_t chunk_frame)
Constructor.
Exception when too many seek attempts happen.
ErrorEncodingAudio(std::string message, int64_t frame_number=-1)
Constructor.
Base exception class with a custom message variable.
InvalidOptions(std::string message, std::string file_path="")
Constructor.
ErrorDecodingAudio(std::string message, int64_t frame_number=-1)
Constructor.
Exception when resample fails.
ExceptionBase(std::string message)
virtual ~NoStreamsFound() noexcept
virtual ~ReaderClosed() noexcept
OutOfBoundsPoint(std::string message, int point_requested, int max_points)
Constructor.
virtual ~ErrorDecodingAudio() noexcept