aboutsummaryrefslogtreecommitdiffstats
path: root/src/libserver/symcache
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rspamd.com>2022-10-17 11:39:38 +0100
committerVsevolod Stakhov <vsevolod@rspamd.com>2022-10-17 11:39:38 +0100
commitff8d45abef65ae9552a5c089317f96208474bbe6 (patch)
treed3b693cb228f1fb7b5ee3a935600f044cd2a2b92 /src/libserver/symcache
parent14b52f4498c10625f3c16101cd34dec25a59bac6 (diff)
downloadrspamd-ff8d45abef65ae9552a5c089317f96208474bbe6.tar.gz
rspamd-ff8d45abef65ae9552a5c089317f96208474bbe6.zip
[Minor] Use a separate error class instead of std::string
Diffstat (limited to 'src/libserver/symcache')
-rw-r--r--src/libserver/symcache/symcache_impl.cxx9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/libserver/symcache/symcache_impl.cxx b/src/libserver/symcache/symcache_impl.cxx
index c29b9d6d4..4208d4882 100644
--- a/src/libserver/symcache/symcache_impl.cxx
+++ b/src/libserver/symcache/symcache_impl.cxx
@@ -232,7 +232,12 @@ auto symcache::load_items() -> bool
O_RDONLY, PROT_READ);
if (!cached_map.has_value()) {
- msg_info_cache("%s", cached_map.error().c_str());
+ if (cached_map.error().category == util::error_category::CRITICAL) {
+ msg_err_cache("%s", cached_map.error().error_message.data());
+ }
+ else {
+ msg_info_cache("%s", cached_map.error().error_message.data());
+ }
return false;
}
@@ -369,7 +374,7 @@ bool symcache::save_items() const
return false;
}
- msg_err_cache("%s", file_sink.error().c_str());
+ msg_err_cache("%s", file_sink.error().error_message.data());
return false;
}