Mercurial > hg > orthanc
comparison Plugins/Engine/OrthancPlugins.cpp @ 1649:8040d56cb0b3
New function "OrthancPluginRegisterErrorCode()" to declare custom error codes
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 25 Sep 2015 16:24:13 +0200 |
parents | da799f767e5d |
children | 2e692c83e2f3 |
comparison
equal
deleted
inserted
replaced
1648:a0a4fa28624c | 1649:8040d56cb0b3 |
---|---|
1672 IStorageArea& storage = *reinterpret_cast<IStorageArea*>(p.storageArea); | 1672 IStorageArea& storage = *reinterpret_cast<IStorageArea*>(p.storageArea); |
1673 storage.Remove(p.uuid, Plugins::Convert(p.type)); | 1673 storage.Remove(p.uuid, Plugins::Convert(p.type)); |
1674 return true; | 1674 return true; |
1675 } | 1675 } |
1676 | 1676 |
1677 case _OrthancPluginService_RegisterErrorCode: | |
1678 { | |
1679 const _OrthancPluginRegisterErrorCode& p = | |
1680 *reinterpret_cast<const _OrthancPluginRegisterErrorCode*>(parameters); | |
1681 *(p.target) = pimpl_->dictionary_.Register(plugin, p.code, p.httpStatus, p.message); | |
1682 return true; | |
1683 } | |
1684 | |
1677 default: | 1685 default: |
1678 { | 1686 { |
1679 // This service is unknown to the Orthanc plugin engine | 1687 // This service is unknown to the Orthanc plugin engine |
1680 return false; | 1688 return false; |
1681 } | 1689 } |