A class representing an error in SQLite.
More...
#include <Error.h>
A class representing an error in SQLite.
Definition at line 16 of file Error.h.
◆ Error() [1/4]
audacity::sqlite::Error::Error |
( |
| ) |
|
|
noexcept |
◆ Error() [2/4]
audacity::sqlite::Error::Error |
( |
int |
code | ) |
|
|
explicitnoexcept |
◆ Error() [3/4]
audacity::sqlite::Error::Error |
( |
const Error & |
| ) |
|
|
default |
◆ Error() [4/4]
audacity::sqlite::Error::Error |
( |
Error && |
| ) |
|
|
default |
◆ GetCode()
int audacity::sqlite::Error::GetCode |
( |
| ) |
const |
|
noexcept |
◆ GetErrorString()
Definition at line 55 of file Error.cpp.
56{
58 {
59 case SQLITE_OK:
60
61 return XO(
"No error");
62 case SQLITE_ERROR:
63
64 return XO(
"Generic error");
65 case SQLITE_INTERNAL:
66
67 return XO(
"Internal logic error in SQLite");
68 case SQLITE_PERM:
69
70 return XO(
"Access permission denied");
71 case SQLITE_ABORT:
72
73 return XO(
"Callback routine requested an abort");
74 case SQLITE_BUSY:
75
76 return XO(
"The database file is locked");
77 case SQLITE_LOCKED:
78
79 return XO(
"A table in the database is locked");
80 case SQLITE_NOMEM:
81
82 return XO(
"A malloc() failed");
83 case SQLITE_READONLY:
84
85 return XO(
"Attempt to write a read-only database");
86 case SQLITE_INTERRUPT:
87
88 return XO(
"Operation terminated");
89 case SQLITE_IOERR:
90
91 return XO(
"I/O error occurred");
92 case SQLITE_CORRUPT:
93
94 return XO(
"The database disk image is malformed");
95 case SQLITE_NOTFOUND:
96
97 return XO(
"File not found");
98 case SQLITE_FULL:
99
100 return XO(
"Insertion failed because the drive is full");
101 case SQLITE_CANTOPEN:
102
103 return XO(
"Unable to open the database file");
104 case SQLITE_PROTOCOL:
105
106 return XO(
"Database lock protocol error");
107 case SQLITE_SCHEMA:
108
109 return XO(
"The database schema changed");
110 case SQLITE_TOOBIG:
111
112 return XO(
"String or BLOB exceeds size limit");
113 case SQLITE_CONSTRAINT:
114
115 return XO(
"Abort due to constraint violation");
116 case SQLITE_MISMATCH:
117
118 return XO(
"Data type mismatch");
119 case SQLITE_MISUSE:
120
121 return XO(
"Library used incorrectly");
122 case SQLITE_NOLFS:
123
124 return XO(
"The large file support is disabled");
125 case SQLITE_AUTH:
126
127 return XO(
"Authorization denied");
128 case SQLITE_FORMAT:
129
130 return XO(
"Not used");
131 case SQLITE_RANGE:
132
133 return XO(
"2nd parameter to sqlite3_bind out of range");
134 case SQLITE_NOTADB:
135
136 return XO(
"File opened that is not a database file ");
137 default:
138
139 return XO(
"Unknown error");
140 }
141}
References mCode, and XO().
◆ IsError()
bool audacity::sqlite::Error::IsError |
( |
| ) |
const |
|
noexcept |
◆ IsOk()
bool audacity::sqlite::Error::IsOk |
( |
| ) |
const |
|
noexcept |
◆ operator bool()
audacity::sqlite::Error::operator bool |
( |
| ) |
const |
|
explicitnoexcept |
Returns true if the object represents a success code.
Definition at line 35 of file Error.cpp.
36{
38}
bool IsOk() const noexcept
Returns true if the object represents a success code.
◆ operator=() [1/2]
Error & audacity::sqlite::Error::operator= |
( |
const Error & |
| ) |
|
|
default |
◆ operator=() [2/2]
Error & audacity::sqlite::Error::operator= |
( |
Error && |
| ) |
|
|
default |
◆ Raise()
void audacity::sqlite::Error::Raise |
( |
| ) |
const |
Definition at line 40 of file Error.cpp.
41{
43
48}
@ Internal
Indicates internal failure from Audacity.
TranslatableString Verbatim(wxString str)
Require calls to the one-argument constructor to go through this distinct global function name.
A MessageBoxException that shows a given, unvarying string.
TranslatableString GetErrorString() const
int GetCode() const noexcept
References Internal, Verbatim(), and XO().
◆ mCode
int audacity::sqlite::Error::mCode |
|
private |
The documentation for this class was generated from the following files: