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