Mercurial > hg > orthanc-python
comparison Sources/Autogenerated/sdk_GlobalFunctions.impl.h @ 77:e7ff5efb100d
Custom exception "orthanc.OrthancException" is raised instead of "ValueError"
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 09 Aug 2021 18:16:42 +0200 |
parents | cbfc72a53970 |
children | eb6ac5a801d1 |
comparison
equal
deleted
inserted
replaced
76:8da2a7bef495 | 77:e7ff5efb100d |
---|---|
117 { | 117 { |
118 return PyBytes_FromStringAndSize(buffer.GetData(), buffer.GetSize()); | 118 return PyBytes_FromStringAndSize(buffer.GetData(), buffer.GetSize()); |
119 } | 119 } |
120 else | 120 else |
121 { | 121 { |
122 PythonLock::RaiseException(OrthancPluginErrorCode_InternalError); | 122 PythonLock::RaiseException(code); |
123 return NULL; | 123 return NULL; |
124 } | 124 } |
125 } | 125 } |
126 | 126 |
127 static PyObject* sdk_OrthancPluginRestApiGet(PyObject* module, PyObject* args) | 127 static PyObject* sdk_OrthancPluginRestApiGet(PyObject* module, PyObject* args) |
142 { | 142 { |
143 return PyBytes_FromStringAndSize(buffer.GetData(), buffer.GetSize()); | 143 return PyBytes_FromStringAndSize(buffer.GetData(), buffer.GetSize()); |
144 } | 144 } |
145 else | 145 else |
146 { | 146 { |
147 PythonLock::RaiseException(OrthancPluginErrorCode_InternalError); | 147 PythonLock::RaiseException(code); |
148 return NULL; | 148 return NULL; |
149 } | 149 } |
150 } | 150 } |
151 | 151 |
152 static PyObject* sdk_OrthancPluginRestApiGetAfterPlugins(PyObject* module, PyObject* args) | 152 static PyObject* sdk_OrthancPluginRestApiGetAfterPlugins(PyObject* module, PyObject* args) |
167 { | 167 { |
168 return PyBytes_FromStringAndSize(buffer.GetData(), buffer.GetSize()); | 168 return PyBytes_FromStringAndSize(buffer.GetData(), buffer.GetSize()); |
169 } | 169 } |
170 else | 170 else |
171 { | 171 { |
172 PythonLock::RaiseException(OrthancPluginErrorCode_InternalError); | 172 PythonLock::RaiseException(code); |
173 return NULL; | 173 return NULL; |
174 } | 174 } |
175 } | 175 } |
176 | 176 |
177 static PyObject* sdk_OrthancPluginRestApiPost(PyObject* module, PyObject* args) | 177 static PyObject* sdk_OrthancPluginRestApiPost(PyObject* module, PyObject* args) |
193 { | 193 { |
194 return PyBytes_FromStringAndSize(buffer.GetData(), buffer.GetSize()); | 194 return PyBytes_FromStringAndSize(buffer.GetData(), buffer.GetSize()); |
195 } | 195 } |
196 else | 196 else |
197 { | 197 { |
198 PythonLock::RaiseException(OrthancPluginErrorCode_InternalError); | 198 PythonLock::RaiseException(code); |
199 return NULL; | 199 return NULL; |
200 } | 200 } |
201 } | 201 } |
202 | 202 |
203 static PyObject* sdk_OrthancPluginRestApiPostAfterPlugins(PyObject* module, PyObject* args) | 203 static PyObject* sdk_OrthancPluginRestApiPostAfterPlugins(PyObject* module, PyObject* args) |
219 { | 219 { |
220 return PyBytes_FromStringAndSize(buffer.GetData(), buffer.GetSize()); | 220 return PyBytes_FromStringAndSize(buffer.GetData(), buffer.GetSize()); |
221 } | 221 } |
222 else | 222 else |
223 { | 223 { |
224 PythonLock::RaiseException(OrthancPluginErrorCode_InternalError); | 224 PythonLock::RaiseException(code); |
225 return NULL; | 225 return NULL; |
226 } | 226 } |
227 } | 227 } |
228 | 228 |
229 static PyObject* sdk_OrthancPluginRestApiDelete(PyObject* module, PyObject* args) | 229 static PyObject* sdk_OrthancPluginRestApiDelete(PyObject* module, PyObject* args) |
297 { | 297 { |
298 return PyBytes_FromStringAndSize(buffer.GetData(), buffer.GetSize()); | 298 return PyBytes_FromStringAndSize(buffer.GetData(), buffer.GetSize()); |
299 } | 299 } |
300 else | 300 else |
301 { | 301 { |
302 PythonLock::RaiseException(OrthancPluginErrorCode_InternalError); | 302 PythonLock::RaiseException(code); |
303 return NULL; | 303 return NULL; |
304 } | 304 } |
305 } | 305 } |
306 | 306 |
307 static PyObject* sdk_OrthancPluginRestApiPutAfterPlugins(PyObject* module, PyObject* args) | 307 static PyObject* sdk_OrthancPluginRestApiPutAfterPlugins(PyObject* module, PyObject* args) |
323 { | 323 { |
324 return PyBytes_FromStringAndSize(buffer.GetData(), buffer.GetSize()); | 324 return PyBytes_FromStringAndSize(buffer.GetData(), buffer.GetSize()); |
325 } | 325 } |
326 else | 326 else |
327 { | 327 { |
328 PythonLock::RaiseException(OrthancPluginErrorCode_InternalError); | 328 PythonLock::RaiseException(code); |
329 return NULL; | 329 return NULL; |
330 } | 330 } |
331 } | 331 } |
332 | 332 |
333 static PyObject* sdk_OrthancPluginLookupPatient(PyObject* module, PyObject* args) | 333 static PyObject* sdk_OrthancPluginLookupPatient(PyObject* module, PyObject* args) |
703 { | 703 { |
704 return PyBytes_FromStringAndSize(buffer.GetData(), buffer.GetSize()); | 704 return PyBytes_FromStringAndSize(buffer.GetData(), buffer.GetSize()); |
705 } | 705 } |
706 else | 706 else |
707 { | 707 { |
708 PythonLock::RaiseException(OrthancPluginErrorCode_InternalError); | 708 PythonLock::RaiseException(code); |
709 return NULL; | 709 return NULL; |
710 } | 710 } |
711 } | 711 } |
712 | 712 |
713 static PyObject* sdk_OrthancPluginReadFile(PyObject* module, PyObject* args) | 713 static PyObject* sdk_OrthancPluginReadFile(PyObject* module, PyObject* args) |
728 { | 728 { |
729 return PyBytes_FromStringAndSize(buffer.GetData(), buffer.GetSize()); | 729 return PyBytes_FromStringAndSize(buffer.GetData(), buffer.GetSize()); |
730 } | 730 } |
731 else | 731 else |
732 { | 732 { |
733 PythonLock::RaiseException(OrthancPluginErrorCode_InternalError); | 733 PythonLock::RaiseException(code); |
734 return NULL; | 734 return NULL; |
735 } | 735 } |
736 } | 736 } |
737 | 737 |
738 static PyObject* sdk_OrthancPluginWriteFile(PyObject* module, PyObject* args) | 738 static PyObject* sdk_OrthancPluginWriteFile(PyObject* module, PyObject* args) |
837 { | 837 { |
838 return PyBytes_FromStringAndSize(buffer.GetData(), buffer.GetSize()); | 838 return PyBytes_FromStringAndSize(buffer.GetData(), buffer.GetSize()); |
839 } | 839 } |
840 else | 840 else |
841 { | 841 { |
842 PythonLock::RaiseException(OrthancPluginErrorCode_InternalError); | 842 PythonLock::RaiseException(code); |
843 return NULL; | 843 return NULL; |
844 } | 844 } |
845 } | 845 } |
846 | 846 |
847 static PyObject* sdk_OrthancPluginCompressJpegImage(PyObject* module, PyObject* args) | 847 static PyObject* sdk_OrthancPluginCompressJpegImage(PyObject* module, PyObject* args) |
867 { | 867 { |
868 return PyBytes_FromStringAndSize(buffer.GetData(), buffer.GetSize()); | 868 return PyBytes_FromStringAndSize(buffer.GetData(), buffer.GetSize()); |
869 } | 869 } |
870 else | 870 else |
871 { | 871 { |
872 PythonLock::RaiseException(OrthancPluginErrorCode_InternalError); | 872 PythonLock::RaiseException(code); |
873 return NULL; | 873 return NULL; |
874 } | 874 } |
875 } | 875 } |
876 | 876 |
877 static PyObject* sdk_OrthancPluginHttpGet(PyObject* module, PyObject* args) | 877 static PyObject* sdk_OrthancPluginHttpGet(PyObject* module, PyObject* args) |
894 { | 894 { |
895 return PyBytes_FromStringAndSize(buffer.GetData(), buffer.GetSize()); | 895 return PyBytes_FromStringAndSize(buffer.GetData(), buffer.GetSize()); |
896 } | 896 } |
897 else | 897 else |
898 { | 898 { |
899 PythonLock::RaiseException(OrthancPluginErrorCode_InternalError); | 899 PythonLock::RaiseException(code); |
900 return NULL; | 900 return NULL; |
901 } | 901 } |
902 } | 902 } |
903 | 903 |
904 static PyObject* sdk_OrthancPluginHttpPost(PyObject* module, PyObject* args) | 904 static PyObject* sdk_OrthancPluginHttpPost(PyObject* module, PyObject* args) |
922 { | 922 { |
923 return PyBytes_FromStringAndSize(buffer.GetData(), buffer.GetSize()); | 923 return PyBytes_FromStringAndSize(buffer.GetData(), buffer.GetSize()); |
924 } | 924 } |
925 else | 925 else |
926 { | 926 { |
927 PythonLock::RaiseException(OrthancPluginErrorCode_InternalError); | 927 PythonLock::RaiseException(code); |
928 return NULL; | 928 return NULL; |
929 } | 929 } |
930 } | 930 } |
931 | 931 |
932 static PyObject* sdk_OrthancPluginHttpPut(PyObject* module, PyObject* args) | 932 static PyObject* sdk_OrthancPluginHttpPut(PyObject* module, PyObject* args) |
950 { | 950 { |
951 return PyBytes_FromStringAndSize(buffer.GetData(), buffer.GetSize()); | 951 return PyBytes_FromStringAndSize(buffer.GetData(), buffer.GetSize()); |
952 } | 952 } |
953 else | 953 else |
954 { | 954 { |
955 PythonLock::RaiseException(OrthancPluginErrorCode_InternalError); | 955 PythonLock::RaiseException(code); |
956 return NULL; | 956 return NULL; |
957 } | 957 } |
958 } | 958 } |
959 | 959 |
960 static PyObject* sdk_OrthancPluginHttpDelete(PyObject* module, PyObject* args) | 960 static PyObject* sdk_OrthancPluginHttpDelete(PyObject* module, PyObject* args) |
1506 { | 1506 { |
1507 return PyBytes_FromStringAndSize(buffer.GetData(), buffer.GetSize()); | 1507 return PyBytes_FromStringAndSize(buffer.GetData(), buffer.GetSize()); |
1508 } | 1508 } |
1509 else | 1509 else |
1510 { | 1510 { |
1511 PythonLock::RaiseException(OrthancPluginErrorCode_InternalError); | 1511 PythonLock::RaiseException(code); |
1512 return NULL; | 1512 return NULL; |
1513 } | 1513 } |
1514 } | 1514 } |
1515 | 1515 |
1516 static PyObject* sdk_OrthancPluginGenerateRestApiAuthorizationToken(PyObject* module, PyObject* args) | 1516 static PyObject* sdk_OrthancPluginGenerateRestApiAuthorizationToken(PyObject* module, PyObject* args) |