Skip to content

Commit 366ff2c

Browse files
committed
src: Don't pass "" file_path args to exceptions
1 parent 49749d5 commit 366ff2c

20 files changed

+49
-49
lines changed

src/CacheDisk.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,7 @@ void CacheDisk::SetJson(string value) {
519519

520520
if (!success)
521521
// Raise exception
522-
throw InvalidJSON("JSON could not be parsed (or is invalid)", "");
522+
throw InvalidJSON("JSON could not be parsed (or is invalid)");
523523

524524
try
525525
{
@@ -529,7 +529,7 @@ void CacheDisk::SetJson(string value) {
529529
catch (const std::exception& e)
530530
{
531531
// Error parsing JSON (or missing keys)
532-
throw InvalidJSON("JSON is invalid (missing keys or invalid data types)", "");
532+
throw InvalidJSON("JSON is invalid (missing keys or invalid data types)");
533533
}
534534
}
535535

src/CacheMemory.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ void CacheMemory::SetJson(string value) {
372372
delete reader;
373373
if (!success)
374374
// Raise exception
375-
throw InvalidJSON("JSON could not be parsed (or is invalid)", "");
375+
throw InvalidJSON("JSON could not be parsed (or is invalid)");
376376

377377
try
378378
{
@@ -382,7 +382,7 @@ void CacheMemory::SetJson(string value) {
382382
catch (const std::exception& e)
383383
{
384384
// Error parsing JSON (or missing keys)
385-
throw InvalidJSON("JSON is invalid (missing keys or invalid data types)", "");
385+
throw InvalidJSON("JSON is invalid (missing keys or invalid data types)");
386386
}
387387
}
388388

src/ChunkReader.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ void ChunkReader::SetJson(string value) {
292292
delete reader;
293293
if (!success)
294294
// Raise exception
295-
throw InvalidJSON("JSON could not be parsed (or is invalid)", "");
295+
throw InvalidJSON("JSON could not be parsed (or is invalid)");
296296

297297
try
298298
{
@@ -302,7 +302,7 @@ void ChunkReader::SetJson(string value) {
302302
catch (const std::exception& e)
303303
{
304304
// Error parsing JSON (or missing keys)
305-
throw InvalidJSON("JSON is invalid (missing keys or invalid data types)", "");
305+
throw InvalidJSON("JSON is invalid (missing keys or invalid data types)");
306306
}
307307
}
308308

src/Clip.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ ReaderBase* Clip::Reader()
235235
return reader;
236236
else
237237
// Throw error if reader not initialized
238-
throw ReaderClosed("No Reader has been initialized for this Clip. Call Reader(*reader) before calling this method.", "");
238+
throw ReaderClosed("No Reader has been initialized for this Clip. Call Reader(*reader) before calling this method.");
239239
}
240240

241241
// Open the internal reader
@@ -252,7 +252,7 @@ void Clip::Open()
252252
}
253253
else
254254
// Throw error if reader not initialized
255-
throw ReaderClosed("No Reader has been initialized for this Clip. Call Reader(*reader) before calling this method.", "");
255+
throw ReaderClosed("No Reader has been initialized for this Clip. Call Reader(*reader) before calling this method.");
256256
}
257257

258258
// Close the internal reader
@@ -266,7 +266,7 @@ void Clip::Close()
266266
}
267267
else
268268
// Throw error if reader not initialized
269-
throw ReaderClosed("No Reader has been initialized for this Clip. Call Reader(*reader) before calling this method.", "");
269+
throw ReaderClosed("No Reader has been initialized for this Clip. Call Reader(*reader) before calling this method.");
270270
}
271271

272272
// Get end position of clip (trim end of video), which can be affected by the time curve.
@@ -282,7 +282,7 @@ float Clip::End()
282282
fps = reader->info.fps.ToFloat();
283283
else
284284
// Throw error if reader not initialized
285-
throw ReaderClosed("No Reader has been initialized for this Clip. Call Reader(*reader) before calling this method.", "");
285+
throw ReaderClosed("No Reader has been initialized for this Clip. Call Reader(*reader) before calling this method.");
286286

287287
return float(time.GetLength()) / fps;
288288
}
@@ -350,7 +350,7 @@ std::shared_ptr<Frame> Clip::GetFrame(int64_t requested_frame)
350350
}
351351
else
352352
// Throw error if reader not initialized
353-
throw ReaderClosed("No Reader has been initialized for this Clip. Call Reader(*reader) before calling this method.", "");
353+
throw ReaderClosed("No Reader has been initialized for this Clip. Call Reader(*reader) before calling this method.");
354354
}
355355

356356
// Get file extension
@@ -394,7 +394,7 @@ void Clip::get_time_mapped_frame(std::shared_ptr<Frame> frame, int64_t frame_num
394394
// Check for valid reader
395395
if (!reader)
396396
// Throw error if reader not initialized
397-
throw ReaderClosed("No Reader has been initialized for this Clip. Call Reader(*reader) before calling this method.", "");
397+
throw ReaderClosed("No Reader has been initialized for this Clip. Call Reader(*reader) before calling this method.");
398398

399399
// Check for a valid time map curve
400400
if (time.Values.size() > 1)
@@ -812,7 +812,7 @@ void Clip::SetJson(string value) {
812812

813813
if (!success)
814814
// Raise exception
815-
throw InvalidJSON("JSON could not be parsed (or is invalid)", "");
815+
throw InvalidJSON("JSON could not be parsed (or is invalid)");
816816

817817
try
818818
{
@@ -822,7 +822,7 @@ void Clip::SetJson(string value) {
822822
catch (const std::exception& e)
823823
{
824824
// Error parsing JSON (or missing keys)
825-
throw InvalidJSON("JSON is invalid (missing keys or invalid data types)", "");
825+
throw InvalidJSON("JSON is invalid (missing keys or invalid data types)");
826826
}
827827
}
828828

src/Color.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ void Color::SetJson(string value) {
120120

121121
if (!success)
122122
// Raise exception
123-
throw InvalidJSON("JSON could not be parsed (or is invalid)", "");
123+
throw InvalidJSON("JSON could not be parsed (or is invalid)");
124124

125125
try
126126
{
@@ -130,7 +130,7 @@ void Color::SetJson(string value) {
130130
catch (const std::exception& e)
131131
{
132132
// Error parsing JSON (or missing keys)
133-
throw InvalidJSON("JSON is invalid (missing keys or invalid data types)", "");
133+
throw InvalidJSON("JSON is invalid (missing keys or invalid data types)");
134134
}
135135
}
136136

src/Coordinate.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ void Coordinate::SetJson(string value) {
8383

8484
if (!success)
8585
// Raise exception
86-
throw InvalidJSON("JSON could not be parsed (or is invalid)", "");
86+
throw InvalidJSON("JSON could not be parsed (or is invalid)");
8787

8888
try
8989
{
@@ -93,7 +93,7 @@ void Coordinate::SetJson(string value) {
9393
catch (const std::exception& e)
9494
{
9595
// Error parsing JSON (or missing keys)
96-
throw InvalidJSON("JSON is invalid (missing keys or invalid data types)", "");
96+
throw InvalidJSON("JSON is invalid (missing keys or invalid data types)");
9797
}
9898
}
9999

src/DecklinkReader.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ void DecklinkReader::SetJson(string value) {
278278

279279
if (!success)
280280
// Raise exception
281-
throw InvalidJSON("JSON could not be parsed (or is invalid)", "");
281+
throw InvalidJSON("JSON could not be parsed (or is invalid)");
282282

283283
try
284284
{
@@ -288,7 +288,7 @@ void DecklinkReader::SetJson(string value) {
288288
catch (const std::exception& e)
289289
{
290290
// Error parsing JSON (or missing keys)
291-
throw InvalidJSON("JSON is invalid (missing keys or invalid data types)", "");
291+
throw InvalidJSON("JSON is invalid (missing keys or invalid data types)");
292292
}
293293
}
294294

src/DecklinkWriter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ void DecklinkWriter::WriteFrame(std::shared_ptr<Frame> frame)
234234
{
235235
// Check for open reader (or throw exception)
236236
if (!is_open)
237-
throw WriterClosed("The DecklinkWriter is closed. Call Open() before calling this method.", "");
237+
throw WriterClosed("The DecklinkWriter is closed. Call Open() before calling this method.");
238238

239239
delegate->WriteFrame(frame);
240240
}

src/DummyReader.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ void DummyReader::SetJson(string value) {
156156

157157
if (!success)
158158
// Raise exception
159-
throw InvalidJSON("JSON could not be parsed (or is invalid)", "");
159+
throw InvalidJSON("JSON could not be parsed (or is invalid)");
160160

161161
try
162162
{
@@ -166,7 +166,7 @@ void DummyReader::SetJson(string value) {
166166
catch (const std::exception& e)
167167
{
168168
// Error parsing JSON (or missing keys)
169-
throw InvalidJSON("JSON is invalid (missing keys or invalid data types)", "");
169+
throw InvalidJSON("JSON is invalid (missing keys or invalid data types)");
170170
}
171171
}
172172

src/EffectBase.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ void EffectBase::SetJson(string value) {
112112

113113
if (!success)
114114
// Raise exception
115-
throw InvalidJSON("JSON could not be parsed (or is invalid)", "");
115+
throw InvalidJSON("JSON could not be parsed (or is invalid)");
116116

117117
try
118118
{
@@ -122,7 +122,7 @@ void EffectBase::SetJson(string value) {
122122
catch (const std::exception& e)
123123
{
124124
// Error parsing JSON (or missing keys)
125-
throw InvalidJSON("JSON is invalid (missing keys or invalid data types)", "");
125+
throw InvalidJSON("JSON is invalid (missing keys or invalid data types)");
126126
}
127127
}
128128

0 commit comments

Comments
 (0)