Mercurial > hg > orthanc
comparison Core/Enumerations.cpp @ 1583:9ea3d082b064
got rid of custom exceptions
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 25 Aug 2015 17:52:50 +0200 |
parents | bd1889029cbb |
children | f2e3d030ea59 |
comparison
equal
deleted
inserted
replaced
1582:bd1889029cbb | 1583:9ea3d082b064 |
---|---|
44 // "Resources/GenerateErrorCodes.py" | 44 // "Resources/GenerateErrorCodes.py" |
45 const char* EnumerationToString(ErrorCode error) | 45 const char* EnumerationToString(ErrorCode error) |
46 { | 46 { |
47 switch (error) | 47 switch (error) |
48 { | 48 { |
49 case ErrorCode_Custom: | |
50 return "Custom error, see the attached error message"; | |
51 | |
52 case ErrorCode_InternalError: | 49 case ErrorCode_InternalError: |
53 return "Internal error"; | 50 return "Internal error"; |
54 | 51 |
55 case ErrorCode_Success: | 52 case ErrorCode_Success: |
56 return "Success"; | 53 return "Success"; |
268 case ErrorCode_UnknownModality: | 265 case ErrorCode_UnknownModality: |
269 return "Unknown modality"; | 266 return "Unknown modality"; |
270 | 267 |
271 case ErrorCode_BadJobOrdering: | 268 case ErrorCode_BadJobOrdering: |
272 return "Bad ordering of filters in a job"; | 269 return "Bad ordering of filters in a job"; |
270 | |
271 case ErrorCode_JsonToLuaTable: | |
272 return "Cannot convert the given JSON object to a Lua table"; | |
273 | |
274 case ErrorCode_CannotCreateLua: | |
275 return "Cannot create the Lua context"; | |
276 | |
277 case ErrorCode_CannotExecuteLua: | |
278 return "Cannot execute a Lua command"; | |
279 | |
280 case ErrorCode_LuaAlreadyExecuted: | |
281 return "Arguments cannot be pushed after the Lua function is executed"; | |
282 | |
283 case ErrorCode_LuaBadOutput: | |
284 return "The Lua function does not give the expected number of outputs"; | |
285 | |
286 case ErrorCode_NotLuaPredicate: | |
287 return "The Lua function is not a predicate (only true/false outputs allowed)"; | |
288 | |
289 case ErrorCode_LuaReturnsNoString: | |
290 return "The Lua function does not return a string"; | |
273 | 291 |
274 default: | 292 default: |
275 return "Unknown error code"; | 293 return "Unknown error code"; |
276 } | 294 } |
277 } | 295 } |