}
else
{
- throw bad_conversion("incorrect value for type bool");
+ throw bad_conversion("Incorrect value for type bool");
}
}
if (errno == ERANGE)
{
- throw bad_conversion("is out of range for unsigned long");
+ throw bad_conversion("Is out of range for unsigned long");
}
if (str == str_end)
{
- throw bad_conversion("incorrect value for type unsigned long");
+ throw bad_conversion("Incorrect value for type unsigned long");
}
if (*str_end != '\0')
{
- throw bad_conversion("contains not number symbols");
+ throw bad_conversion("Contains not number symbols");
}
return value;
catch (const std::runtime_error &e)
{
std::stringstream ss;
- ss << "variable " << name << "=" << str_value <<
+ ss << "Variable " << name << "=" << str_value <<
" can't be parsed: " << e.what();
throw config_error(ss.str());
}
bool is_name = true;
auto parse_error = std::runtime_error(
"FileConfigProvider::FileConfigProvider(): "
- "can't parse config file (syntax error)"
+ "Can't parse config file (syntax error)"
);
if (line[0] == '=')
throw std::system_error(
errno, std::system_category(),
"FileConfigProvider::FileConfigProvider(): "
- "can't parse config file"
+ "Can't parse config file"
);
}
else
{
throw std::runtime_error(
"FileConfigProvider::FileConfigProvider(): "
- "can't parse config file (unknown error)"
+ "Can't parse config file (unknown error)"
);
}
}
{
if (OutputStream == LoggerOutputStream::File && FileName.empty())
{
- throw config_error("file name is required for file output");
+ throw config_error("File name is required for file output");
}
}
if (errno == ERANGE)
{
- throw bad_conversion("is out of range");
+ throw bad_conversion("Is out of range");
}
if (str == str_end)
{
- throw bad_conversion("incorrect value for type LogLevel");
+ throw bad_conversion("Incorrect value for type LogLevel");
}
if (*str_end != '\0')
{
- throw bad_conversion("contains not number symbols");
+ throw bad_conversion("Contains not number symbols");
}
if (value < static_cast<long>(LogLevel::None) ||
value > static_cast<long>(LogLevel::All))
{
- throw bad_conversion("is out of range");
+ throw bad_conversion("Is out of range");
}
return static_cast<LogLevel>(value);
}
else
{
- throw bad_conversion("incorrect value for type LoggerOutputStream");
+ throw bad_conversion("Incorrect value for type LoggerOutputStream");
}
}
{
if (SamplingTimeoutMs == 0)
{
- throw config_error("sampling timeout should be non-zero");
+ throw config_error("Sampling timeout should be non-zero");
}
}
}
else
{
- throw bad_conversion("incorrect value for type CollectionMethod");
+ throw bad_conversion("Incorrect value for type CollectionMethod");
}
}
case CollectionMethod::Sampling:
return "Sampling";
-
- default:
- assert(!"Unreachable");
- return "UNKNOWN";
}
}
{
if (OutputStream == TraceLogOutputStream::File && FileName.empty())
{
- throw config_error("file name is required for file output");
+ throw config_error("File name is required for file output");
}
}
}
else
{
- throw bad_conversion("incorrect value for type TraceLogOutputStream");
+ throw bad_conversion("Incorrect value for type TraceLogOutputStream");
}
}
if (capacity == 0)
return;
else if (capacity > max_size())
- throw std::length_error("capacity exceeds the maximum size");
+ throw std::length_error("Capacity exceeds the maximum size");
m_buf = reinterpret_cast<T*>(malloc(capacity * sizeof(T)));
if (pthread_rwlock_init(&pimpl->rwlock, NULL))
{
throw std::system_error(errno, std::system_category(),
- "can't create shared_mutex");
+ "Can't create shared_mutex");
}
}
if (pthread_rwlock_wrlock(&pimpl->rwlock))
{
throw std::system_error(errno, std::system_category(),
- "can't lock shared_mutex");
+ "Can't lock shared_mutex");
}
}
if (err && err != EBUSY)
{
throw std::system_error(errno, std::system_category(),
- "can't exclusively lock shared_mutex");
+ "Can't exclusively lock shared_mutex");
}
return err == 0;
if (pthread_rwlock_unlock(&pimpl->rwlock))
{
throw std::system_error(errno, std::system_category(),
- "can't exclusively unlock shared_mutex");
+ "Can't exclusively unlock shared_mutex");
}
}
if (pthread_rwlock_rdlock(&pimpl->rwlock))
{
throw std::system_error(errno, std::system_category(),
- "can't shared lock shared_mutex");
+ "Can't shared lock shared_mutex");
}
}
if (err && err != EBUSY)
{
throw std::system_error(errno, std::system_category(),
- "can't shared lock shared_mutex");
+ "Can't shared lock shared_mutex");
}
return err == 0;
if (pthread_rwlock_unlock(&pimpl->rwlock))
{
throw std::system_error(errno, std::system_category(),
- "can't shared unlock shared_mutex");
+ "Can't shared unlock shared_mutex");
}
}