Mercurial > hg > orthanc
comparison Plugins/Engine/PluginsEnumerations.cpp @ 1626:8dc468f44661
mapping of error codes from plugins to Orthanc
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 18 Sep 2015 14:28:47 +0200 |
parents | c17b1142caab |
children | ffd23c0104af |
comparison
equal
deleted
inserted
replaced
1625:c17b1142caab | 1626:8dc468f44661 |
---|---|
37 | 37 |
38 namespace Orthanc | 38 namespace Orthanc |
39 { | 39 { |
40 namespace Plugins | 40 namespace Plugins |
41 { | 41 { |
42 ErrorCode Convert(OrthancPluginErrorCode error) | |
43 { | |
44 switch (error) | |
45 { | |
46 case OrthancPluginErrorCode_InternalError: | |
47 return ErrorCode_InternalError; | |
48 | |
49 case OrthancPluginErrorCode_Success: | |
50 return ErrorCode_Success; | |
51 | |
52 case OrthancPluginErrorCode_Plugin: | |
53 return ErrorCode_Plugin; | |
54 | |
55 case OrthancPluginErrorCode_NotImplemented: | |
56 return ErrorCode_NotImplemented; | |
57 | |
58 case OrthancPluginErrorCode_ParameterOutOfRange: | |
59 return ErrorCode_ParameterOutOfRange; | |
60 | |
61 case OrthancPluginErrorCode_NotEnoughMemory: | |
62 return ErrorCode_NotEnoughMemory; | |
63 | |
64 case OrthancPluginErrorCode_BadParameterType: | |
65 return ErrorCode_BadParameterType; | |
66 | |
67 case OrthancPluginErrorCode_BadSequenceOfCalls: | |
68 return ErrorCode_BadSequenceOfCalls; | |
69 | |
70 case OrthancPluginErrorCode_InexistentItem: | |
71 return ErrorCode_InexistentItem; | |
72 | |
73 case OrthancPluginErrorCode_BadRequest: | |
74 return ErrorCode_BadRequest; | |
75 | |
76 case OrthancPluginErrorCode_NetworkProtocol: | |
77 return ErrorCode_NetworkProtocol; | |
78 | |
79 case OrthancPluginErrorCode_SystemCommand: | |
80 return ErrorCode_SystemCommand; | |
81 | |
82 case OrthancPluginErrorCode_Database: | |
83 return ErrorCode_Database; | |
84 | |
85 case OrthancPluginErrorCode_UriSyntax: | |
86 return ErrorCode_UriSyntax; | |
87 | |
88 case OrthancPluginErrorCode_InexistentFile: | |
89 return ErrorCode_InexistentFile; | |
90 | |
91 case OrthancPluginErrorCode_CannotWriteFile: | |
92 return ErrorCode_CannotWriteFile; | |
93 | |
94 case OrthancPluginErrorCode_BadFileFormat: | |
95 return ErrorCode_BadFileFormat; | |
96 | |
97 case OrthancPluginErrorCode_Timeout: | |
98 return ErrorCode_Timeout; | |
99 | |
100 case OrthancPluginErrorCode_UnknownResource: | |
101 return ErrorCode_UnknownResource; | |
102 | |
103 case OrthancPluginErrorCode_IncompatibleDatabaseVersion: | |
104 return ErrorCode_IncompatibleDatabaseVersion; | |
105 | |
106 case OrthancPluginErrorCode_FullStorage: | |
107 return ErrorCode_FullStorage; | |
108 | |
109 case OrthancPluginErrorCode_CorruptedFile: | |
110 return ErrorCode_CorruptedFile; | |
111 | |
112 case OrthancPluginErrorCode_InexistentTag: | |
113 return ErrorCode_InexistentTag; | |
114 | |
115 case OrthancPluginErrorCode_ReadOnly: | |
116 return ErrorCode_ReadOnly; | |
117 | |
118 case OrthancPluginErrorCode_IncompatibleImageFormat: | |
119 return ErrorCode_IncompatibleImageFormat; | |
120 | |
121 case OrthancPluginErrorCode_IncompatibleImageSize: | |
122 return ErrorCode_IncompatibleImageSize; | |
123 | |
124 case OrthancPluginErrorCode_SharedLibrary: | |
125 return ErrorCode_SharedLibrary; | |
126 | |
127 case OrthancPluginErrorCode_UnknownPluginService: | |
128 return ErrorCode_UnknownPluginService; | |
129 | |
130 case OrthancPluginErrorCode_UnknownDicomTag: | |
131 return ErrorCode_UnknownDicomTag; | |
132 | |
133 case OrthancPluginErrorCode_BadJson: | |
134 return ErrorCode_BadJson; | |
135 | |
136 case OrthancPluginErrorCode_Unauthorized: | |
137 return ErrorCode_Unauthorized; | |
138 | |
139 case OrthancPluginErrorCode_BadFont: | |
140 return ErrorCode_BadFont; | |
141 | |
142 case OrthancPluginErrorCode_SQLiteNotOpened: | |
143 return ErrorCode_SQLiteNotOpened; | |
144 | |
145 case OrthancPluginErrorCode_SQLiteAlreadyOpened: | |
146 return ErrorCode_SQLiteAlreadyOpened; | |
147 | |
148 case OrthancPluginErrorCode_SQLiteCannotOpen: | |
149 return ErrorCode_SQLiteCannotOpen; | |
150 | |
151 case OrthancPluginErrorCode_SQLiteStatementAlreadyUsed: | |
152 return ErrorCode_SQLiteStatementAlreadyUsed; | |
153 | |
154 case OrthancPluginErrorCode_SQLiteExecute: | |
155 return ErrorCode_SQLiteExecute; | |
156 | |
157 case OrthancPluginErrorCode_SQLiteRollbackWithoutTransaction: | |
158 return ErrorCode_SQLiteRollbackWithoutTransaction; | |
159 | |
160 case OrthancPluginErrorCode_SQLiteCommitWithoutTransaction: | |
161 return ErrorCode_SQLiteCommitWithoutTransaction; | |
162 | |
163 case OrthancPluginErrorCode_SQLiteRegisterFunction: | |
164 return ErrorCode_SQLiteRegisterFunction; | |
165 | |
166 case OrthancPluginErrorCode_SQLiteFlush: | |
167 return ErrorCode_SQLiteFlush; | |
168 | |
169 case OrthancPluginErrorCode_SQLiteCannotRun: | |
170 return ErrorCode_SQLiteCannotRun; | |
171 | |
172 case OrthancPluginErrorCode_SQLiteCannotStep: | |
173 return ErrorCode_SQLiteCannotStep; | |
174 | |
175 case OrthancPluginErrorCode_SQLiteBindOutOfRange: | |
176 return ErrorCode_SQLiteBindOutOfRange; | |
177 | |
178 case OrthancPluginErrorCode_SQLitePrepareStatement: | |
179 return ErrorCode_SQLitePrepareStatement; | |
180 | |
181 case OrthancPluginErrorCode_SQLiteTransactionAlreadyStarted: | |
182 return ErrorCode_SQLiteTransactionAlreadyStarted; | |
183 | |
184 case OrthancPluginErrorCode_SQLiteTransactionCommit: | |
185 return ErrorCode_SQLiteTransactionCommit; | |
186 | |
187 case OrthancPluginErrorCode_SQLiteTransactionBegin: | |
188 return ErrorCode_SQLiteTransactionBegin; | |
189 | |
190 case OrthancPluginErrorCode_DirectoryOverFile: | |
191 return ErrorCode_DirectoryOverFile; | |
192 | |
193 case OrthancPluginErrorCode_FileStorageCannotWrite: | |
194 return ErrorCode_FileStorageCannotWrite; | |
195 | |
196 case OrthancPluginErrorCode_DirectoryExpected: | |
197 return ErrorCode_DirectoryExpected; | |
198 | |
199 case OrthancPluginErrorCode_HttpPortInUse: | |
200 return ErrorCode_HttpPortInUse; | |
201 | |
202 case OrthancPluginErrorCode_DicomPortInUse: | |
203 return ErrorCode_DicomPortInUse; | |
204 | |
205 case OrthancPluginErrorCode_BadHttpStatusInRest: | |
206 return ErrorCode_BadHttpStatusInRest; | |
207 | |
208 case OrthancPluginErrorCode_RegularFileExpected: | |
209 return ErrorCode_RegularFileExpected; | |
210 | |
211 case OrthancPluginErrorCode_PathToExecutable: | |
212 return ErrorCode_PathToExecutable; | |
213 | |
214 case OrthancPluginErrorCode_MakeDirectory: | |
215 return ErrorCode_MakeDirectory; | |
216 | |
217 case OrthancPluginErrorCode_BadApplicationEntityTitle: | |
218 return ErrorCode_BadApplicationEntityTitle; | |
219 | |
220 case OrthancPluginErrorCode_NoCFindHandler: | |
221 return ErrorCode_NoCFindHandler; | |
222 | |
223 case OrthancPluginErrorCode_NoCMoveHandler: | |
224 return ErrorCode_NoCMoveHandler; | |
225 | |
226 case OrthancPluginErrorCode_NoCStoreHandler: | |
227 return ErrorCode_NoCStoreHandler; | |
228 | |
229 case OrthancPluginErrorCode_NoApplicationEntityFilter: | |
230 return ErrorCode_NoApplicationEntityFilter; | |
231 | |
232 case OrthancPluginErrorCode_NoSopClassOrInstance: | |
233 return ErrorCode_NoSopClassOrInstance; | |
234 | |
235 case OrthancPluginErrorCode_NoPresentationContext: | |
236 return ErrorCode_NoPresentationContext; | |
237 | |
238 case OrthancPluginErrorCode_DicomFindUnavailable: | |
239 return ErrorCode_DicomFindUnavailable; | |
240 | |
241 case OrthancPluginErrorCode_DicomMoveUnavailable: | |
242 return ErrorCode_DicomMoveUnavailable; | |
243 | |
244 case OrthancPluginErrorCode_CannotStoreInstance: | |
245 return ErrorCode_CannotStoreInstance; | |
246 | |
247 case OrthancPluginErrorCode_CreateDicomNotString: | |
248 return ErrorCode_CreateDicomNotString; | |
249 | |
250 case OrthancPluginErrorCode_CreateDicomOverrideTag: | |
251 return ErrorCode_CreateDicomOverrideTag; | |
252 | |
253 case OrthancPluginErrorCode_CreateDicomUseContent: | |
254 return ErrorCode_CreateDicomUseContent; | |
255 | |
256 case OrthancPluginErrorCode_CreateDicomNoPayload: | |
257 return ErrorCode_CreateDicomNoPayload; | |
258 | |
259 case OrthancPluginErrorCode_CreateDicomUseDataUriScheme: | |
260 return ErrorCode_CreateDicomUseDataUriScheme; | |
261 | |
262 case OrthancPluginErrorCode_CreateDicomBadParent: | |
263 return ErrorCode_CreateDicomBadParent; | |
264 | |
265 case OrthancPluginErrorCode_CreateDicomParentIsInstance: | |
266 return ErrorCode_CreateDicomParentIsInstance; | |
267 | |
268 case OrthancPluginErrorCode_CreateDicomParentEncoding: | |
269 return ErrorCode_CreateDicomParentEncoding; | |
270 | |
271 case OrthancPluginErrorCode_UnknownModality: | |
272 return ErrorCode_UnknownModality; | |
273 | |
274 case OrthancPluginErrorCode_BadJobOrdering: | |
275 return ErrorCode_BadJobOrdering; | |
276 | |
277 case OrthancPluginErrorCode_JsonToLuaTable: | |
278 return ErrorCode_JsonToLuaTable; | |
279 | |
280 case OrthancPluginErrorCode_CannotCreateLua: | |
281 return ErrorCode_CannotCreateLua; | |
282 | |
283 case OrthancPluginErrorCode_CannotExecuteLua: | |
284 return ErrorCode_CannotExecuteLua; | |
285 | |
286 case OrthancPluginErrorCode_LuaAlreadyExecuted: | |
287 return ErrorCode_LuaAlreadyExecuted; | |
288 | |
289 case OrthancPluginErrorCode_LuaBadOutput: | |
290 return ErrorCode_LuaBadOutput; | |
291 | |
292 case OrthancPluginErrorCode_NotLuaPredicate: | |
293 return ErrorCode_NotLuaPredicate; | |
294 | |
295 case OrthancPluginErrorCode_LuaReturnsNoString: | |
296 return ErrorCode_LuaReturnsNoString; | |
297 | |
298 default: | |
299 return ErrorCode_Plugin; | |
300 } | |
301 } | |
302 | |
303 | |
42 OrthancPluginResourceType Convert(ResourceType type) | 304 OrthancPluginResourceType Convert(ResourceType type) |
43 { | 305 { |
44 switch (type) | 306 switch (type) |
45 { | 307 { |
46 case ResourceType_Patient: | 308 case ResourceType_Patient: |