We don't want cause application termination.
All exceptions should be caught and handled.
Change-Id: Ic245fb42a8b8fa7a7d83665ce95c4acb89c5b964
virtual ~ApiInterface() {};
virtual int setPolicies(const std::map<PolicyBucketId, std::vector<Policy>> &insertOrUpdate,
- const std::map<PolicyBucketId, std::vector<PolicyKey>> &remove) noexcept = 0;
- virtual int insertOrUpdateBucket(const PolicyBucketId &bucket, const PolicyResult &policyResult)
- noexcept = 0;
- virtual int removeBucket(const PolicyBucketId &bucket) noexcept = 0;
+ const std::map<PolicyBucketId, std::vector<PolicyKey>> &remove) = 0;
+ virtual int insertOrUpdateBucket(const PolicyBucketId &bucket,
+ const PolicyResult &policyResult) = 0;
+ virtual int removeBucket(const PolicyBucketId &bucket) = 0;
virtual int adminCheck(const PolicyBucketId &startBucket, bool recursive,
- const PolicyKey &key, PolicyResult &result) noexcept = 0;
+ const PolicyKey &key, PolicyResult &result) = 0;
};
}
int Logic::setPolicies(const std::map<PolicyBucketId, std::vector<Policy>> &insertOrUpdate,
- const std::map<PolicyBucketId, std::vector<PolicyKey>> &remove) noexcept {
+ const std::map<PolicyBucketId, std::vector<PolicyKey>> &remove) {
return askCynaraAndInterpreteCodeResponse<SetPoliciesRequest>(insertOrUpdate, remove);
}
int Logic::insertOrUpdateBucket(const PolicyBucketId &bucket,
- const PolicyResult &policyResult) noexcept {
+ const PolicyResult &policyResult) {
return askCynaraAndInterpreteCodeResponse<InsertOrUpdateBucketRequest>(bucket, policyResult);
}
-int Logic::removeBucket(const PolicyBucketId &bucket) noexcept {
+int Logic::removeBucket(const PolicyBucketId &bucket) {
return askCynaraAndInterpreteCodeResponse<RemoveBucketRequest>(bucket);
}
int Logic::adminCheck(const PolicyBucketId &startBucket, bool recursive, const PolicyKey &key,
- PolicyResult &result) noexcept {
+ PolicyResult &result) {
try {
if (!ensureConnection()) {
LOGE("Cannot connect to cynara. Service not available.");
virtual ~Logic() {};
virtual int setPolicies(const std::map<PolicyBucketId, std::vector<Policy>> &insertOrUpdate,
- const std::map<PolicyBucketId, std::vector<PolicyKey>> &remove) noexcept;
- virtual int insertOrUpdateBucket(const PolicyBucketId &bucket, const PolicyResult &policyResult)
- noexcept;
- virtual int removeBucket(const PolicyBucketId &bucket) noexcept;
+ const std::map<PolicyBucketId, std::vector<PolicyKey>> &remove);
+ virtual int insertOrUpdateBucket(const PolicyBucketId &bucket,
+ const PolicyResult &policyResult);
+ virtual int removeBucket(const PolicyBucketId &bucket);
virtual int adminCheck(const PolicyBucketId &startBucket, bool recursive,
- const PolicyKey &key, PolicyResult &result) noexcept;
+ const PolicyKey &key, PolicyResult &result);
};
} // namespace Cynara