annotate OrthancFramework/Sources/SQLite/OrthancSQLiteException.h @ 4829:c847b0dfd255

added missing copyright headers
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 25 Nov 2021 18:53:08 +0100
parents d25f4c0fa160
children 7053502fbf97
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1220
9b9026560a5f SQLite wrapper is now fully independent of Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 /**
9b9026560a5f SQLite wrapper is now fully independent of Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2 * Orthanc - A Lightweight, RESTful DICOM Store
9b9026560a5f SQLite wrapper is now fully independent of Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
3 *
3063
fa5ad4368fe3 new mail address
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2380
diff changeset
4 * Copyright (C) 2012-2016 Sebastien Jodogne <s.jodogne@orthanc-labs.com>,
1220
9b9026560a5f SQLite wrapper is now fully independent of Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
5 * Medical Physics Department, CHU of Liege, Belgium
4829
c847b0dfd255 added missing copyright headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4044
diff changeset
6 * Copyright (C) 2017-2021 Osimis S.A., Belgium
1220
9b9026560a5f SQLite wrapper is now fully independent of Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7 *
9b9026560a5f SQLite wrapper is now fully independent of Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8 * Copyright (c) 2012 The Chromium Authors. All rights reserved.
9b9026560a5f SQLite wrapper is now fully independent of Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9 *
9b9026560a5f SQLite wrapper is now fully independent of Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10 * Redistribution and use in source and binary forms, with or without
9b9026560a5f SQLite wrapper is now fully independent of Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11 * modification, are permitted provided that the following conditions are
9b9026560a5f SQLite wrapper is now fully independent of Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
12 * met:
9b9026560a5f SQLite wrapper is now fully independent of Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
13 *
9b9026560a5f SQLite wrapper is now fully independent of Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14 * * Redistributions of source code must retain the above copyright
9b9026560a5f SQLite wrapper is now fully independent of Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15 * notice, this list of conditions and the following disclaimer.
9b9026560a5f SQLite wrapper is now fully independent of Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
16 * * Redistributions in binary form must reproduce the above
9b9026560a5f SQLite wrapper is now fully independent of Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
17 * copyright notice, this list of conditions and the following disclaimer
9b9026560a5f SQLite wrapper is now fully independent of Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
18 * in the documentation and/or other materials provided with the
9b9026560a5f SQLite wrapper is now fully independent of Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
19 * distribution.
9b9026560a5f SQLite wrapper is now fully independent of Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
20 * * Neither the name of Google Inc., the name of the CHU of Liege,
9b9026560a5f SQLite wrapper is now fully independent of Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
21 * nor the names of its contributors may be used to endorse or promote
9b9026560a5f SQLite wrapper is now fully independent of Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22 * products derived from this software without specific prior written
9b9026560a5f SQLite wrapper is now fully independent of Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23 * permission.
9b9026560a5f SQLite wrapper is now fully independent of Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
24 *
9b9026560a5f SQLite wrapper is now fully independent of Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
25 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
9b9026560a5f SQLite wrapper is now fully independent of Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
26 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
9b9026560a5f SQLite wrapper is now fully independent of Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
9b9026560a5f SQLite wrapper is now fully independent of Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
28 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
9b9026560a5f SQLite wrapper is now fully independent of Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
29 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
9b9026560a5f SQLite wrapper is now fully independent of Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
30 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
9b9026560a5f SQLite wrapper is now fully independent of Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
31 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
9b9026560a5f SQLite wrapper is now fully independent of Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
32 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
9b9026560a5f SQLite wrapper is now fully independent of Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
33 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
9b9026560a5f SQLite wrapper is now fully independent of Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
34 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
9b9026560a5f SQLite wrapper is now fully independent of Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
35 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
9b9026560a5f SQLite wrapper is now fully independent of Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
36 **/
9b9026560a5f SQLite wrapper is now fully independent of Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
37
9b9026560a5f SQLite wrapper is now fully independent of Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
38
9b9026560a5f SQLite wrapper is now fully independent of Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
39 #pragma once
9b9026560a5f SQLite wrapper is now fully independent of Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
40
9b9026560a5f SQLite wrapper is now fully independent of Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
41
2380
96b3ec054b69 reorganization in macros
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1900
diff changeset
42 #if ORTHANC_ENABLE_SQLITE != 1
96b3ec054b69 reorganization in macros
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1900
diff changeset
43 # error Macro ORTHANC_ENABLE_SQLITE must be set to 1 to use SQLite
96b3ec054b69 reorganization in macros
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1900
diff changeset
44 #endif
96b3ec054b69 reorganization in macros
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1900
diff changeset
45
96b3ec054b69 reorganization in macros
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1900
diff changeset
46
1220
9b9026560a5f SQLite wrapper is now fully independent of Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
47 #if ORTHANC_SQLITE_STANDALONE == 1
9b9026560a5f SQLite wrapper is now fully independent of Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
48 #include <stdexcept>
9b9026560a5f SQLite wrapper is now fully independent of Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
49
9b9026560a5f SQLite wrapper is now fully independent of Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
50 namespace Orthanc
9b9026560a5f SQLite wrapper is now fully independent of Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
51 {
9b9026560a5f SQLite wrapper is now fully independent of Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
52 namespace SQLite
9b9026560a5f SQLite wrapper is now fully independent of Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
53 {
1585
9a3e03d6a4d5 fix sqlite standalone build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1291
diff changeset
54 // Auto-generated by "Resources/GenerateErrorCodes.py"
9a3e03d6a4d5 fix sqlite standalone build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1291
diff changeset
55 enum ErrorCode
9a3e03d6a4d5 fix sqlite standalone build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1291
diff changeset
56 {
9a3e03d6a4d5 fix sqlite standalone build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1291
diff changeset
57 ErrorCode_ParameterOutOfRange,
9a3e03d6a4d5 fix sqlite standalone build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1291
diff changeset
58 ErrorCode_BadParameterType,
9a3e03d6a4d5 fix sqlite standalone build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1291
diff changeset
59 ErrorCode_SQLiteNotOpened,
9a3e03d6a4d5 fix sqlite standalone build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1291
diff changeset
60 ErrorCode_SQLiteAlreadyOpened,
9a3e03d6a4d5 fix sqlite standalone build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1291
diff changeset
61 ErrorCode_SQLiteCannotOpen,
9a3e03d6a4d5 fix sqlite standalone build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1291
diff changeset
62 ErrorCode_SQLiteStatementAlreadyUsed,
9a3e03d6a4d5 fix sqlite standalone build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1291
diff changeset
63 ErrorCode_SQLiteExecute,
9a3e03d6a4d5 fix sqlite standalone build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1291
diff changeset
64 ErrorCode_SQLiteRollbackWithoutTransaction,
9a3e03d6a4d5 fix sqlite standalone build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1291
diff changeset
65 ErrorCode_SQLiteCommitWithoutTransaction,
9a3e03d6a4d5 fix sqlite standalone build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1291
diff changeset
66 ErrorCode_SQLiteRegisterFunction,
9a3e03d6a4d5 fix sqlite standalone build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1291
diff changeset
67 ErrorCode_SQLiteFlush,
9a3e03d6a4d5 fix sqlite standalone build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1291
diff changeset
68 ErrorCode_SQLiteCannotRun,
9a3e03d6a4d5 fix sqlite standalone build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1291
diff changeset
69 ErrorCode_SQLiteCannotStep,
9a3e03d6a4d5 fix sqlite standalone build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1291
diff changeset
70 ErrorCode_SQLiteBindOutOfRange,
9a3e03d6a4d5 fix sqlite standalone build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1291
diff changeset
71 ErrorCode_SQLitePrepareStatement,
9a3e03d6a4d5 fix sqlite standalone build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1291
diff changeset
72 ErrorCode_SQLiteTransactionAlreadyStarted,
9a3e03d6a4d5 fix sqlite standalone build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1291
diff changeset
73 ErrorCode_SQLiteTransactionCommit,
9a3e03d6a4d5 fix sqlite standalone build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1291
diff changeset
74 ErrorCode_SQLiteTransactionBegin
9a3e03d6a4d5 fix sqlite standalone build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1291
diff changeset
75 };
9a3e03d6a4d5 fix sqlite standalone build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1291
diff changeset
76
1220
9b9026560a5f SQLite wrapper is now fully independent of Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
77 class OrthancSQLiteException : public ::std::runtime_error
9b9026560a5f SQLite wrapper is now fully independent of Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
78 {
9b9026560a5f SQLite wrapper is now fully independent of Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
79 public:
1585
9a3e03d6a4d5 fix sqlite standalone build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1291
diff changeset
80 OrthancSQLiteException(ErrorCode error) :
9a3e03d6a4d5 fix sqlite standalone build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1291
diff changeset
81 ::std::runtime_error(EnumerationToString(error))
1220
9b9026560a5f SQLite wrapper is now fully independent of Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
82 {
9b9026560a5f SQLite wrapper is now fully independent of Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
83 }
9b9026560a5f SQLite wrapper is now fully independent of Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
84
1585
9a3e03d6a4d5 fix sqlite standalone build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1291
diff changeset
85 // Auto-generated by "Resources/GenerateErrorCodes.py"
9a3e03d6a4d5 fix sqlite standalone build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1291
diff changeset
86 static const char* EnumerationToString(ErrorCode code)
1220
9b9026560a5f SQLite wrapper is now fully independent of Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
87 {
1585
9a3e03d6a4d5 fix sqlite standalone build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1291
diff changeset
88 switch (code)
9a3e03d6a4d5 fix sqlite standalone build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1291
diff changeset
89 {
9a3e03d6a4d5 fix sqlite standalone build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1291
diff changeset
90 case ErrorCode_ParameterOutOfRange:
9a3e03d6a4d5 fix sqlite standalone build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1291
diff changeset
91 return "Parameter out of range";
9a3e03d6a4d5 fix sqlite standalone build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1291
diff changeset
92
9a3e03d6a4d5 fix sqlite standalone build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1291
diff changeset
93 case ErrorCode_BadParameterType:
9a3e03d6a4d5 fix sqlite standalone build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1291
diff changeset
94 return "Bad type for a parameter";
9a3e03d6a4d5 fix sqlite standalone build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1291
diff changeset
95
9a3e03d6a4d5 fix sqlite standalone build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1291
diff changeset
96 case ErrorCode_SQLiteNotOpened:
9a3e03d6a4d5 fix sqlite standalone build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1291
diff changeset
97 return "SQLite: The database is not opened";
9a3e03d6a4d5 fix sqlite standalone build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1291
diff changeset
98
9a3e03d6a4d5 fix sqlite standalone build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1291
diff changeset
99 case ErrorCode_SQLiteAlreadyOpened:
9a3e03d6a4d5 fix sqlite standalone build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1291
diff changeset
100 return "SQLite: Connection is already open";
9a3e03d6a4d5 fix sqlite standalone build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1291
diff changeset
101
9a3e03d6a4d5 fix sqlite standalone build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1291
diff changeset
102 case ErrorCode_SQLiteCannotOpen:
9a3e03d6a4d5 fix sqlite standalone build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1291
diff changeset
103 return "SQLite: Unable to open the database";
9a3e03d6a4d5 fix sqlite standalone build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1291
diff changeset
104
9a3e03d6a4d5 fix sqlite standalone build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1291
diff changeset
105 case ErrorCode_SQLiteStatementAlreadyUsed:
9a3e03d6a4d5 fix sqlite standalone build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1291
diff changeset
106 return "SQLite: This cached statement is already being referred to";
9a3e03d6a4d5 fix sqlite standalone build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1291
diff changeset
107
9a3e03d6a4d5 fix sqlite standalone build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1291
diff changeset
108 case ErrorCode_SQLiteExecute:
9a3e03d6a4d5 fix sqlite standalone build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1291
diff changeset
109 return "SQLite: Cannot execute a command";
9a3e03d6a4d5 fix sqlite standalone build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1291
diff changeset
110
9a3e03d6a4d5 fix sqlite standalone build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1291
diff changeset
111 case ErrorCode_SQLiteRollbackWithoutTransaction:
9a3e03d6a4d5 fix sqlite standalone build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1291
diff changeset
112 return "SQLite: Rolling back a nonexistent transaction (have you called Begin()?)";
9a3e03d6a4d5 fix sqlite standalone build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1291
diff changeset
113
9a3e03d6a4d5 fix sqlite standalone build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1291
diff changeset
114 case ErrorCode_SQLiteCommitWithoutTransaction:
9a3e03d6a4d5 fix sqlite standalone build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1291
diff changeset
115 return "SQLite: Committing a nonexistent transaction";
9a3e03d6a4d5 fix sqlite standalone build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1291
diff changeset
116
9a3e03d6a4d5 fix sqlite standalone build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1291
diff changeset
117 case ErrorCode_SQLiteRegisterFunction:
9a3e03d6a4d5 fix sqlite standalone build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1291
diff changeset
118 return "SQLite: Unable to register a function";
9a3e03d6a4d5 fix sqlite standalone build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1291
diff changeset
119
9a3e03d6a4d5 fix sqlite standalone build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1291
diff changeset
120 case ErrorCode_SQLiteFlush:
9a3e03d6a4d5 fix sqlite standalone build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1291
diff changeset
121 return "SQLite: Unable to flush the database";
9a3e03d6a4d5 fix sqlite standalone build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1291
diff changeset
122
9a3e03d6a4d5 fix sqlite standalone build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1291
diff changeset
123 case ErrorCode_SQLiteCannotRun:
9a3e03d6a4d5 fix sqlite standalone build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1291
diff changeset
124 return "SQLite: Cannot run a cached statement";
9a3e03d6a4d5 fix sqlite standalone build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1291
diff changeset
125
9a3e03d6a4d5 fix sqlite standalone build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1291
diff changeset
126 case ErrorCode_SQLiteCannotStep:
9a3e03d6a4d5 fix sqlite standalone build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1291
diff changeset
127 return "SQLite: Cannot step over a cached statement";
9a3e03d6a4d5 fix sqlite standalone build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1291
diff changeset
128
9a3e03d6a4d5 fix sqlite standalone build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1291
diff changeset
129 case ErrorCode_SQLiteBindOutOfRange:
9a3e03d6a4d5 fix sqlite standalone build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1291
diff changeset
130 return "SQLite: Bing a value while out of range (serious error)";
9a3e03d6a4d5 fix sqlite standalone build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1291
diff changeset
131
9a3e03d6a4d5 fix sqlite standalone build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1291
diff changeset
132 case ErrorCode_SQLitePrepareStatement:
9a3e03d6a4d5 fix sqlite standalone build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1291
diff changeset
133 return "SQLite: Cannot prepare a cached statement";
9a3e03d6a4d5 fix sqlite standalone build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1291
diff changeset
134
9a3e03d6a4d5 fix sqlite standalone build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1291
diff changeset
135 case ErrorCode_SQLiteTransactionAlreadyStarted:
9a3e03d6a4d5 fix sqlite standalone build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1291
diff changeset
136 return "SQLite: Beginning the same transaction twice";
9a3e03d6a4d5 fix sqlite standalone build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1291
diff changeset
137
9a3e03d6a4d5 fix sqlite standalone build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1291
diff changeset
138 case ErrorCode_SQLiteTransactionCommit:
9a3e03d6a4d5 fix sqlite standalone build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1291
diff changeset
139 return "SQLite: Failure when committing the transaction";
9a3e03d6a4d5 fix sqlite standalone build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1291
diff changeset
140
9a3e03d6a4d5 fix sqlite standalone build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1291
diff changeset
141 case ErrorCode_SQLiteTransactionBegin:
9a3e03d6a4d5 fix sqlite standalone build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1291
diff changeset
142 return "SQLite: Cannot start a transaction";
9a3e03d6a4d5 fix sqlite standalone build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1291
diff changeset
143
9a3e03d6a4d5 fix sqlite standalone build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1291
diff changeset
144 default:
9a3e03d6a4d5 fix sqlite standalone build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1291
diff changeset
145 return "Unknown error code";
9a3e03d6a4d5 fix sqlite standalone build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1291
diff changeset
146 }
1220
9b9026560a5f SQLite wrapper is now fully independent of Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
147 }
9b9026560a5f SQLite wrapper is now fully independent of Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
148 };
9b9026560a5f SQLite wrapper is now fully independent of Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
149 }
9b9026560a5f SQLite wrapper is now fully independent of Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
150 }
9b9026560a5f SQLite wrapper is now fully independent of Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
151
9b9026560a5f SQLite wrapper is now fully independent of Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
152 #else
9b9026560a5f SQLite wrapper is now fully independent of Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
153 # include "../OrthancException.h"
9b9026560a5f SQLite wrapper is now fully independent of Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
154 # define OrthancSQLiteException ::Orthanc::OrthancException
9b9026560a5f SQLite wrapper is now fully independent of Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
155 #endif