You've already forked libopenshot
mirror of
https://github.com/OpenShot/libopenshot.git
synced 2026-03-02 08:53:52 -08:00
Merge pull request #265 from ferdnyc/catch-by-reference
Exceptions: catch-by-reference and other cleanup
This commit is contained in:
@@ -121,7 +121,7 @@ void ChunkReader::load_json()
|
||||
info.audio_timebase.den = root["audio_timebase"]["den"].asInt();
|
||||
|
||||
}
|
||||
catch (exception e)
|
||||
catch (const std::exception& e)
|
||||
{
|
||||
// Error parsing JSON (or missing keys)
|
||||
throw InvalidJSON("JSON could not be parsed (or is invalid).", path);
|
||||
@@ -235,7 +235,7 @@ std::shared_ptr<Frame> ChunkReader::GetFrame(int64_t requested_frame)
|
||||
local_reader = new FFmpegReader(chunk_video_path);
|
||||
local_reader->Open(); // open reader
|
||||
|
||||
} catch (InvalidFile)
|
||||
} catch (const InvalidFile& e)
|
||||
{
|
||||
// Invalid Chunk (possibly it is not found)
|
||||
throw ChunkNotFound(path, requested_frame, location.number, location.frame);
|
||||
@@ -299,7 +299,7 @@ void ChunkReader::SetJson(string value) {
|
||||
// Set all values that match
|
||||
SetJsonValue(root);
|
||||
}
|
||||
catch (exception e)
|
||||
catch (const std::exception& e)
|
||||
{
|
||||
// Error parsing JSON (or missing keys)
|
||||
throw InvalidJSON("JSON is invalid (missing keys or invalid data types)", "");
|
||||
|
||||
Reference in New Issue
Block a user