Tag Parser: exceptions.h Source File

Tag Parser 12.5.3 C++ library for reading and writing MP4 (iTunes), ID3, Vorbis, Opus, FLAC and Matroska tags

Loading...
Searching...
No Matches
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
9namespace TagParser {
10
11 class TAG_PARSER_EXPORT Failure : public std::exception {
12public:
13 Failure() noexcept;
14 virtual ~Failure() noexcept;
15 virtual const char *what() const noexcept;
16};
17
18 class TAG_PARSER_EXPORT NoDataFoundException : public Failure {
19public:
20 NoDataFoundException() noexcept;
21 virtual ~NoDataFoundException() noexcept;
22 virtual const char *what() const noexcept;
23};
24
25 class TAG_PARSER_EXPORT InvalidDataException : public Failure {
26public:
27 InvalidDataException() noexcept;
28 virtual ~InvalidDataException() noexcept;
29 virtual const char *what() const noexcept;
30};
31
32 class TAG_PARSER_EXPORT NoDataProvidedException : public Failure {
33public:
34 NoDataProvidedException() noexcept;
35 virtual ~NoDataProvidedException() noexcept;
36 virtual const char *what() const noexcept;
37};
38
39 class TAG_PARSER_EXPORT TruncatedDataException : public InvalidDataException {
40public:
41 TruncatedDataException() noexcept;
42 virtual ~TruncatedDataException() noexcept;
43 virtual const char *what() const noexcept;
44};
45
46 class TAG_PARSER_EXPORT OperationAbortedException : public Failure {
47public:
48 OperationAbortedException() noexcept;
49 virtual ~OperationAbortedException() noexcept;
50 virtual const char *what() const noexcept;
51};
52
53 class TAG_PARSER_EXPORT VersionNotSupportedException : public Failure {
54public:
55 VersionNotSupportedException() noexcept;
56 virtual ~VersionNotSupportedException() noexcept;
57 virtual const char *what() const noexcept;
58};
59
60 class TAG_PARSER_EXPORT NotImplementedException : public Failure {
61public:
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
TagParser::Failure::what
virtual const char * what() const noexcept
Returns a C-style character string describing the cause of the exception.
Definition exceptions.cpp:30
TagParser::Failure::Failure
Failure() noexcept
Constructs a new exception.
Definition exceptions.cpp:16
TagParser::InvalidDataException::InvalidDataException
InvalidDataException() noexcept
Constructs a new exception.
Definition exceptions.cpp:73
TagParser::InvalidDataException::what
virtual const char * what() const noexcept
Returns a C-style character string describing the cause of the exception.
Definition exceptions.cpp:87
TagParser::NoDataFoundException::what
virtual const char * what() const noexcept
Returns a C-style character string describing the cause of the exception.
Definition exceptions.cpp:59
TagParser::NoDataFoundException::NoDataFoundException
NoDataFoundException() noexcept
Constructs a new exception.
Definition exceptions.cpp:45
TagParser::NoDataProvidedException::NoDataProvidedException
NoDataProvidedException() noexcept
Constructs a new exception.
Definition exceptions.cpp:101
TagParser::NoDataProvidedException::what
virtual const char * what() const noexcept
Returns a C-style character string describing the cause of the exception.
Definition exceptions.cpp:115
TagParser::NotImplementedException::what
virtual const char * what() const noexcept
Returns a C-style character string describing the cause of the exception.
Definition exceptions.cpp:227
TagParser::NotImplementedException::NotImplementedException
NotImplementedException() noexcept
Constructs a new exception.
Definition exceptions.cpp:213
TagParser::OperationAbortedException::what
virtual const char * what() const noexcept
Returns a C-style character string describing the cause of the exception.
Definition exceptions.cpp:171
TagParser::OperationAbortedException::OperationAbortedException
OperationAbortedException() noexcept
Constructs a new exception.
Definition exceptions.cpp:157
TagParser::TruncatedDataException::TruncatedDataException
TruncatedDataException() noexcept
Constructs a new exception.
Definition exceptions.cpp:129
TagParser::TruncatedDataException::what
virtual const char * what() const noexcept
Returns a C-style character string describing the cause of the exception.
Definition exceptions.cpp:143
TagParser::VersionNotSupportedException::VersionNotSupportedException
VersionNotSupportedException() noexcept
Constructs a new exception.
Definition exceptions.cpp:185
TagParser::VersionNotSupportedException::what
virtual const char * what() const noexcept
Returns a C-style character string describing the cause of the exception.
Definition exceptions.cpp:199
global.h
TAG_PARSER_EXPORT
#define TAG_PARSER_EXPORT
Marks the symbol to be exported by the tagparser library.
Definition global.h:14
TagParser
Contains all classes and functions of the TagInfo library.
Definition aaccodebook.h:10