Mercurial > hg > orthanc
changeset 2044:0f35383dd6cc
doc
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 23 Jun 2016 17:32:01 +0200 |
parents | 35ccba7adae9 |
children | 21a8ca9ad928 |
files | Core/HttpClient.cpp Plugins/Include/orthanc/OrthancCPlugin.h |
diffstat | 2 files changed, 9 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/Core/HttpClient.cpp Thu Jun 23 10:08:27 2016 +0200 +++ b/Core/HttpClient.cpp Thu Jun 23 17:32:01 2016 +0200 @@ -189,7 +189,7 @@ throw OrthancException(ErrorCode_Unauthorized); case HttpStatus_404_NotFound: - throw OrthancException(ErrorCode_InexistentItem); + throw OrthancException(ErrorCode_UnknownResource); default: throw OrthancException(ErrorCode_NetworkProtocol); @@ -197,7 +197,6 @@ } - static CURLcode CheckCode(CURLcode code) { if (code == CURLE_NOT_BUILT_IN)
--- a/Plugins/Include/orthanc/OrthancCPlugin.h Thu Jun 23 10:08:27 2016 +0200 +++ b/Plugins/Include/orthanc/OrthancCPlugin.h Thu Jun 23 17:32:01 2016 +0200 @@ -1569,6 +1569,7 @@ * @param target The target memory buffer. It must be freed with OrthancPluginFreeMemoryBuffer(). * @param uri The URI in the built-in Orthanc API. * @return 0 if success, or the error code if failure. + * @note If the resource is not existing (error 404), the error code will be OrthancPluginErrorCode_UnknownResource. * @see OrthancPluginRestApiGetAfterPlugins * @ingroup Orthanc **/ @@ -1598,6 +1599,7 @@ * @param target The target memory buffer. It must be freed with OrthancPluginFreeMemoryBuffer(). * @param uri The URI in the built-in Orthanc API. * @return 0 if success, or the error code if failure. + * @note If the resource is not existing (error 404), the error code will be OrthancPluginErrorCode_UnknownResource. * @see OrthancPluginRestApiGet * @ingroup Orthanc **/ @@ -1634,6 +1636,7 @@ * @param body The body of the POST request. * @param bodySize The size of the body. * @return 0 if success, or the error code if failure. + * @note If the resource is not existing (error 404), the error code will be OrthancPluginErrorCode_UnknownResource. * @see OrthancPluginRestApiPostAfterPlugins * @ingroup Orthanc **/ @@ -1668,6 +1671,7 @@ * @param body The body of the POST request. * @param bodySize The size of the body. * @return 0 if success, or the error code if failure. + * @note If the resource is not existing (error 404), the error code will be OrthancPluginErrorCode_UnknownResource. * @see OrthancPluginRestApiPost * @ingroup Orthanc **/ @@ -1696,6 +1700,7 @@ * @param context The Orthanc plugin context, as received by OrthancPluginInitialize(). * @param uri The URI to delete in the built-in Orthanc API. * @return 0 if success, or the error code if failure. + * @note If the resource is not existing (error 404), the error code will be OrthancPluginErrorCode_UnknownResource. * @see OrthancPluginRestApiDeleteAfterPlugins * @ingroup Orthanc **/ @@ -1718,6 +1723,7 @@ * @param context The Orthanc plugin context, as received by OrthancPluginInitialize(). * @param uri The URI to delete in the built-in Orthanc API. * @return 0 if success, or the error code if failure. + * @note If the resource is not existing (error 404), the error code will be OrthancPluginErrorCode_UnknownResource. * @see OrthancPluginRestApiDelete * @ingroup Orthanc **/ @@ -1742,6 +1748,7 @@ * @param body The body of the PUT request. * @param bodySize The size of the body. * @return 0 if success, or the error code if failure. + * @note If the resource is not existing (error 404), the error code will be OrthancPluginErrorCode_UnknownResource. * @see OrthancPluginRestApiPutAfterPlugins * @ingroup Orthanc **/ @@ -1777,6 +1784,7 @@ * @param body The body of the PUT request. * @param bodySize The size of the body. * @return 0 if success, or the error code if failure. + * @note If the resource is not existing (error 404), the error code will be OrthancPluginErrorCode_UnknownResource. * @see OrthancPluginRestApiPut * @ingroup Orthanc **/