Skip to content

Commit 49749d5

Browse files
committed
Exceptions.h: Optional file_path args
Makes nearly all `file_path` arguments optional, unless the exception deals with file operations specifically (e.g. InvalidFile still requires file_path)
1 parent 5e1e8ce commit 49749d5

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

include/Exceptions.h

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ namespace openshot {
111111
{
112112
public:
113113
std::string file_path;
114-
InvalidChannels(std::string message, std::string file_path)
114+
InvalidChannels(std::string message, std::string file_path="")
115115
: BaseException(message), file_path(file_path) { }
116116
virtual ~InvalidChannels() noexcept {}
117117
};
@@ -121,7 +121,7 @@ namespace openshot {
121121
{
122122
public:
123123
std::string file_path;
124-
InvalidCodec(std::string message, std::string file_path)
124+
InvalidCodec(std::string message, std::string file_path="")
125125
: BaseException(message), file_path(file_path) { }
126126
virtual ~InvalidCodec() noexcept {}
127127
};
@@ -141,7 +141,7 @@ namespace openshot {
141141
{
142142
public:
143143
std::string file_path;
144-
InvalidFormat(std::string message, std::string file_path)
144+
InvalidFormat(std::string message, std::string file_path="")
145145
: BaseException(message), file_path(file_path) { }
146146
virtual ~InvalidFormat() noexcept {}
147147
};
@@ -151,7 +151,7 @@ namespace openshot {
151151
{
152152
public:
153153
std::string file_path;
154-
InvalidJSON(std::string message, std::string file_path)
154+
InvalidJSON(std::string message, std::string file_path="")
155155
: BaseException(message), file_path(file_path) { }
156156
virtual ~InvalidJSON() noexcept {}
157157
};
@@ -161,7 +161,7 @@ namespace openshot {
161161
{
162162
public:
163163
std::string file_path;
164-
InvalidOptions(std::string message, std::string file_path)
164+
InvalidOptions(std::string message, std::string file_path="")
165165
: BaseException(message), file_path(file_path) { }
166166
virtual ~InvalidOptions() noexcept {}
167167
};
@@ -171,7 +171,7 @@ namespace openshot {
171171
{
172172
public:
173173
std::string file_path;
174-
InvalidSampleRate(std::string message, std::string file_path)
174+
InvalidSampleRate(std::string message, std::string file_path="")
175175
: BaseException(message), file_path(file_path) { }
176176
virtual ~InvalidSampleRate() noexcept {}
177177
};
@@ -191,7 +191,7 @@ namespace openshot {
191191
{
192192
public:
193193
std::string file_path;
194-
NoStreamsFound(std::string message, std::string file_path)
194+
NoStreamsFound(std::string message, std::string file_path="")
195195
: BaseException(message), file_path(file_path) { }
196196
virtual ~NoStreamsFound() noexcept {}
197197
};
@@ -223,7 +223,7 @@ namespace openshot {
223223
{
224224
public:
225225
std::string file_path;
226-
OutOfMemory(std::string message, std::string file_path)
226+
OutOfMemory(std::string message, std::string file_path="")
227227
: BaseException(message), file_path(file_path) { }
228228
virtual ~OutOfMemory() noexcept {}
229229
};
@@ -233,7 +233,7 @@ namespace openshot {
233233
{
234234
public:
235235
std::string file_path;
236-
ReaderClosed(std::string message, std::string file_path)
236+
ReaderClosed(std::string message, std::string file_path="")
237237
: BaseException(message), file_path(file_path) { }
238238
virtual ~ReaderClosed() noexcept {}
239239
};
@@ -243,7 +243,7 @@ namespace openshot {
243243
{
244244
public:
245245
std::string file_path;
246-
ResampleError(std::string message, std::string file_path)
246+
ResampleError(std::string message, std::string file_path="")
247247
: BaseException(message), file_path(file_path) { }
248248
virtual ~ResampleError() noexcept {}
249249
};
@@ -253,7 +253,7 @@ namespace openshot {
253253
{
254254
public:
255255
std::string file_path;
256-
TooManySeeks(std::string message, std::string file_path)
256+
TooManySeeks(std::string message, std::string file_path="")
257257
: BaseException(message), file_path(file_path) { }
258258
virtual ~TooManySeeks() noexcept {}
259259
};
@@ -263,7 +263,7 @@ namespace openshot {
263263
{
264264
public:
265265
std::string file_path;
266-
WriterClosed(std::string message, std::string file_path)
266+
WriterClosed(std::string message, std::string file_path="")
267267
: BaseException(message), file_path(file_path) { }
268268
virtual ~WriterClosed() noexcept {}
269269
};

0 commit comments

Comments
 (0)