Tag Parser  8.2.0
C++ library for reading and writing MP4 (iTunes), ID3, Vorbis, Opus, FLAC and Matroska tags
exceptions.h
Go to the documentation of this file.
1 #ifndef TAG_PARSER_EXCEPTIONS_H
2 #define TAG_PARSER_EXCEPTIONS_H
3 
4 #include "./global.h"
5 
6 #include <stdexcept>
7 #include <string>
8 
9 namespace TagParser {
10 
11 class TAG_PARSER_EXPORT Failure : public std::exception {
12 public:
13  Failure() noexcept;
14  virtual ~Failure() noexcept;
15  virtual const char *what() const noexcept;
16 };
17 
19 public:
20  NoDataFoundException() noexcept;
21  virtual ~NoDataFoundException() noexcept;
22  virtual const char *what() const noexcept;
23 };
24 
26 public:
27  InvalidDataException() noexcept;
28  virtual ~InvalidDataException() noexcept;
29  virtual const char *what() const noexcept;
30 };
31 
33 public:
34  NoDataProvidedException() noexcept;
35  virtual ~NoDataProvidedException() noexcept;
36  virtual const char *what() const noexcept;
37 };
38 
40 public:
41  TruncatedDataException() noexcept;
42  virtual ~TruncatedDataException() noexcept;
43  virtual const char *what() const noexcept;
44 };
45 
47 public:
48  OperationAbortedException() noexcept;
49  virtual ~OperationAbortedException() noexcept;
50  virtual const char *what() const noexcept;
51 };
52 
54 public:
56  virtual ~VersionNotSupportedException() noexcept;
57  virtual const char *what() const noexcept;
58 };
59 
61 public:
62  NotImplementedException() noexcept;
63  virtual ~NotImplementedException() noexcept;
64  virtual const char *what() const noexcept;
65 };
66 
70 #define CHECK_MAX_SIZE(sizeDenotation) \
71  if (maxSize < sizeDenotation) { \
72  throw TruncatedDataException(); \
73  } else { \
74  maxSize -= sizeDenotation; \
75  }
76 
77 } // namespace TagParser
78 
79 #endif // TAG_PARSER_EXCEPTIONS_H
This exception is thrown when the an operation is invoked that has not been implemented yet.
Definition: exceptions.h:60
The exception that is thrown when the data to be parsed is truncated and therefore can not be parsed ...
Definition: exceptions.h:39
The exception that is thrown when an operation fails because the detected or specified version is not...
Definition: exceptions.h:53
The exception that is thrown when the data to be parsed holds no parsable information (e....
Definition: exceptions.h:18
The exception that is thrown when the data to be parsed or to be made seems invalid and therefore can...
Definition: exceptions.h:25
The class inherits from std::exception and serves as base class for exceptions thrown by the elements...
Definition: exceptions.h:11
The exception that is thrown when an operation has been stopped and thus not successfully completed b...
Definition: exceptions.h:46
Contains all classes and functions of the TagInfo library.
Definition: aaccodebook.h:9
#define TAG_PARSER_EXPORT
Marks the symbol to be exported by the tagparser library.