/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
+ * Copyright (c) 2015 - 2021 Samsung Electronics Co., Ltd All Rights Reserved
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
cynara_async_status status,
void *ptr)
{
- static_cast<Cynara *>(ptr)->ChangeStatus(oldFd, newFd, status);
+ try {
+ static_cast<Cynara *>(ptr)->ChangeStatus(oldFd, newFd, status);
+ } catch (const std::exception& e) {
+ LogError("Cynara::ChangeStatus failed: " << e.what());
+ } catch (...) {
+ LogError("Cynara::ChangeStatus failed with unknown exception");
+ }
+
}
void Cynara::ProcessResponseCallback(
int response,
void *ptr)
{
- static_cast<Cynara *>(ptr)->ProcessResponse(checkId, cause, response);
+ try {
+ static_cast<Cynara *>(ptr)->ProcessResponse(checkId, cause, response);
+ } catch (const std::exception& e) {
+ LogError("Cynara::ProcessResponse failed: " << e.what());
+ } catch (...) {
+ LogError("Cynara::ProcessResponse failed with unknown exception");
+ }
}
bool Cynara::GetUserFromSocket(int socket, std::string &user)