comparison Core/SQLite/FunctionContext.cpp @ 1220:9b9026560a5f

SQLite wrapper is now fully independent of Orthanc
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 10 Nov 2014 16:33:51 +0100
parents a811bdf8b8eb
children 63d47b1fa239
comparison
equal deleted inserted replaced
1219:c4ae92753d57 1220:9b9026560a5f
1 /** 1 /**
2 * Orthanc - A Lightweight, RESTful DICOM Store 2 * Orthanc - A Lightweight, RESTful DICOM Store
3 * Copyright (C) 2012-2014 Medical Physics Department, CHU of Liege, 3 *
4 * Belgium 4 * Copyright (C) 2012-2014 Sebastien Jodogne <s.jodogne@gmail.com>,
5 * Medical Physics Department, CHU of Liege, Belgium
5 * 6 *
6 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are 8 * modification, are permitted provided that the following conditions are
8 * met: 9 * met:
9 * 10 *
29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 30 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 **/ 32 **/
32 33
33 34
35 #if ORTHANC_SQLITE_STANDALONE != 1
34 #include "../PrecompiledHeaders.h" 36 #include "../PrecompiledHeaders.h"
37 #endif
38
35 #include "FunctionContext.h" 39 #include "FunctionContext.h"
40 #include "OrthancSQLiteException.h"
36 41
37 #include <sqlite3.h> 42 #include <sqlite3.h>
38 43
39 namespace Orthanc 44 namespace Orthanc
40 { 45 {
55 60
56 void FunctionContext::CheckIndex(unsigned int index) const 61 void FunctionContext::CheckIndex(unsigned int index) const
57 { 62 {
58 if (index >= argc_) 63 if (index >= argc_)
59 { 64 {
60 throw OrthancException(ErrorCode_ParameterOutOfRange); 65 throw OrthancSQLiteException("Parameter out of range");
61 } 66 }
62 } 67 }
63 68
64 ColumnType FunctionContext::GetColumnType(unsigned int index) const 69 ColumnType FunctionContext::GetColumnType(unsigned int index) const
65 { 70 {