This file is indexed.

/usr/include/libopenshot/Exceptions.h is in libopenshot-dev 0.1.9+dfsg1-3build1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
/**
 * @file
 * @brief Header file for all Exception classes
 * @author Jonathan Thomas <jonathan@openshot.org>
 *
 * @section LICENSE
 *
 * Copyright (c) 2008-2014 OpenShot Studios, LLC
 * <http://www.openshotstudios.com/>. This file is part of
 * OpenShot Library (libopenshot), an open-source project dedicated to
 * delivering high quality video editing and animation solutions to the
 * world. For more information visit <http://www.openshot.org/>.
 *
 * OpenShot Library (libopenshot) is free software: you can redistribute it
 * and/or modify it under the terms of the GNU Lesser General Public License
 * as published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 *
 * OpenShot Library (libopenshot) is distributed in the hope that it will be
 * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with OpenShot Library. If not, see <http://www.gnu.org/licenses/>.
 */

#ifndef OPENSHOT_EXCEPTIONS_H
#define OPENSHOT_EXCEPTIONS_H

#include <string>
using namespace std;

namespace openshot {

	/**
	 * @brief Base exception class with a custom message variable.
	 *
	 * A custom error message field has been added to the std::exception base class.  All
	 * OpenShot exception classes inherit from this class.
	 */
	class BaseException : public std::exception //: public exception
	{
	protected:
		string m_message;
	public:
		BaseException(string message) : m_message(message) { }
		virtual ~BaseException() throw () {}
		virtual const char* what() const throw () {
			// return custom message
			return m_message.c_str();
		}
	};

	/// Exception when a required chunk is missing
	class ChunkNotFound : public BaseException
	{
	public:
		string file_path;
		int64_t frame_number;
		int64_t chunk_number;
		int64_t chunk_frame;
		ChunkNotFound(string message, int64_t frame_number, int64_t chunk_number, int64_t chunk_frame)
			: BaseException(message), frame_number(frame_number), chunk_number(chunk_number), chunk_frame(chunk_frame) { }
		virtual ~ChunkNotFound() throw () {}
	};


	/// Exception when accessing a blackmagic decklink card
	class DecklinkError : public BaseException
	{
	public:
		DecklinkError(string message)
			: BaseException(message) { }
		virtual ~DecklinkError() throw () {}
	};

	/// Exception when decoding audio packet
	class ErrorDecodingAudio : public BaseException
	{
	public:
		string file_path;
		int64_t frame_number;
		ErrorDecodingAudio(string message, int64_t frame_number)
			: BaseException(message), frame_number(frame_number) { }
		virtual ~ErrorDecodingAudio() throw () {}
	};

	/// Exception when encoding audio packet
	class ErrorEncodingAudio : public BaseException
	{
	public:
		string file_path;
		int64_t frame_number;
		ErrorEncodingAudio(string message, int64_t frame_number)
			: BaseException(message), frame_number(frame_number) { }
		virtual ~ErrorEncodingAudio() throw () {}
	};

	/// Exception when encoding audio packet
	class ErrorEncodingVideo : public BaseException
	{
	public:
		string file_path;
		int64_t frame_number;
		ErrorEncodingVideo(string message, int64_t frame_number)
			: BaseException(message), frame_number(frame_number) { }
		virtual ~ErrorEncodingVideo() throw () {}
	};

	/// Exception when an invalid # of audio channels are detected
	class InvalidChannels : public BaseException
	{
	public:
		string file_path;
		InvalidChannels(string message, string file_path)
			: BaseException(message), file_path(file_path) { }
		virtual ~InvalidChannels() throw () {}
	};

	/// Exception when no valid codec is found for a file
	class InvalidCodec : public BaseException
	{
	public:
		string file_path;
		InvalidCodec(string message, string file_path)
			: BaseException(message), file_path(file_path) { }
		virtual ~InvalidCodec() throw () {}
	};

	/// Exception for files that can not be found or opened
	class InvalidFile : public BaseException
	{
	public:
		string file_path;
		InvalidFile(string message, string file_path)
			: BaseException(message), file_path(file_path) { }
		virtual ~InvalidFile() throw () {}
	};

	/// Exception when no valid format is found for a file
	class InvalidFormat : public BaseException
	{
	public:
		string file_path;
		InvalidFormat(string message, string file_path)
			: BaseException(message), file_path(file_path) { }
		virtual ~InvalidFormat() throw () {}
	};

	/// Exception for invalid JSON
	class InvalidJSON : public BaseException
	{
	public:
		string file_path;
		InvalidJSON(string message, string file_path)
			: BaseException(message), file_path(file_path) { }
		virtual ~InvalidJSON() throw () {}
	};

	/// Exception when invalid encoding options are used
	class InvalidOptions : public BaseException
	{
	public:
		string file_path;
		InvalidOptions(string message, string file_path)
			: BaseException(message), file_path(file_path) { }
		virtual ~InvalidOptions() throw () {}
	};

	/// Exception when invalid sample rate is detected during encoding
	class InvalidSampleRate : public BaseException
	{
	public:
		string file_path;
		InvalidSampleRate(string message, string file_path)
			: BaseException(message), file_path(file_path) { }
		virtual ~InvalidSampleRate() throw () {}
	};

	/// Exception for missing JSON Change key
	class InvalidJSONKey : public BaseException
	{
	public:
		string json;
		InvalidJSONKey(string message, string json)
			: BaseException(message), json(json) { }
		virtual ~InvalidJSONKey() throw () {}
	};

	/// Exception when no streams are found in the file
	class NoStreamsFound : public BaseException
	{
	public:
		string file_path;
		NoStreamsFound(string message, string file_path)
			: BaseException(message), file_path(file_path) { }
		virtual ~NoStreamsFound() throw () {}
	};

	/// Exception for frames that are out of bounds.
	class OutOfBoundsFrame : public BaseException
	{
	public:
		int64_t FrameRequested;
		int64_t MaxFrames;
		OutOfBoundsFrame(string message, int64_t frame_requested, int64_t max_frames)
			: BaseException(message), FrameRequested(frame_requested), MaxFrames(max_frames) { }
		virtual ~OutOfBoundsFrame() throw () {}
	};

	/// Exception for an out of bounds key-frame point.
	class OutOfBoundsPoint : public BaseException
	{
	public:
		int PointRequested;
		int MaxPoints;
		OutOfBoundsPoint(string message, int point_requested, int max_points)
			: BaseException(message), PointRequested(point_requested), MaxPoints(max_points) { }
		virtual ~OutOfBoundsPoint() throw () {}
	};

	/// Exception when memory could not be allocated
	class OutOfMemory : public BaseException
	{
	public:
		string file_path;
		OutOfMemory(string message, string file_path)
			: BaseException(message), file_path(file_path) { }
		virtual ~OutOfMemory() throw () {}
	};

	/// Exception when a reader is closed, and a frame is requested
	class ReaderClosed : public BaseException
	{
	public:
		string file_path;
		ReaderClosed(string message, string file_path)
			: BaseException(message), file_path(file_path) { }
		virtual ~ReaderClosed() throw () {}
	};

	/// Exception when resample fails
	class ResampleError : public BaseException
	{
	public:
		string file_path;
		ResampleError(string message, string file_path)
			: BaseException(message), file_path(file_path) { }
		virtual ~ResampleError() throw () {}
	};

	/// Exception when too many seek attempts happen
	class TooManySeeks : public BaseException
	{
	public:
		string file_path;
		TooManySeeks(string message, string file_path)
			: BaseException(message), file_path(file_path) { }
		virtual ~TooManySeeks() throw () {}
	};

	/// Exception when a writer is closed, and a frame is requested
	class WriterClosed : public BaseException
	{
	public:
		string file_path;
		WriterClosed(string message, string file_path)
			: BaseException(message), file_path(file_path) { }
		virtual ~WriterClosed() throw () {}
	};
}

#endif