/*
- * Copyright (c) 2011 - 2016 Samsung Electronics Co., Ltd All Rights Reserved
+ * Copyright (c) 2011 - 2019 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.
*/
#pragma once
-#include <dpl/exception.h>
#include <string>
#include <cerrno>
namespace SecurityManager {
-DECLARE_EXCEPTION_TYPE(SecurityManager::Exception, InvalidErrnoValue)
-
std::string GetErrnoString(int error = errno);
} // namespace SecurityManager
/*
- * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
+ * Copyright (c) 2011 - 2019 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.
case EINVAL:
// We got an invalid errno value
::free(buffer);
- ThrowMsg(InvalidErrnoValue, "Invalid errno value: " << error);
+ return std::string("Invalid errno value: ") + std::to_string(error);
case ERANGE:
// Incease buffer size and retry
continue;
default:
- AssertMsg(0, "Invalid errno value after call to strerror_r!");
+ return std::string("Invalid errno value after call to strerror_r!");
}
}
}