From 8d405b265285c368df2e9cf1c14acee7532e0ee7 Mon Sep 17 00:00:00 2001 From: nancy.liao <huihui.liao@greentest.com.cn> Date: ćšć, 29 5æ 2025 18:14:38 +0800 Subject: [PATCH] Merge branch 'develop' of http://139.9.88.116:3000/r/module/open-license-manager into develop --- src/library/os/linux/dmi_info.cpp | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/library/os/linux/dmi_info.cpp b/src/library/os/linux/dmi_info.cpp index 13dc3a7..603411f 100644 --- a/src/library/os/linux/dmi_info.cpp +++ b/src/library/os/linux/dmi_info.cpp @@ -10,9 +10,9 @@ DmiInfo::DmiInfo() { try { m_bios_vendor = toupper_copy(trim_copy(get_file_contents("/sys/class/dmi/id/sys_vendor", 256))); - } catch (std::string &e) { + } catch (const std::exception& e) { m_bios_vendor = ""; - LOG_DEBUG("Can not read sys_vendor", e); + LOG_DEBUG("Can not read sys_vendor %s", e.what()); } try { m_bios_description = toupper_copy(trim_copy(get_file_contents("/sys/class/dmi/id/modalias", 256))); @@ -20,9 +20,9 @@ if (last_char == '\r' || last_char == '\n') { m_bios_description = m_bios_description.erase(m_bios_description.length() - 1); } - } catch (std::string &e) { + } catch (const std::exception& e) { m_bios_description = ""; - LOG_DEBUG("Can not read bios_description", e); + LOG_DEBUG("Can not read bios_description %s", e.what()); } try { m_sys_vendor = get_file_contents("/sys/class/dmi/id/sys_vendor", 256); @@ -30,9 +30,9 @@ if (last_char == '\r' || last_char == '\n') { m_sys_vendor = m_sys_vendor.erase(m_sys_vendor.length() - 1); } - } catch (std::string &e) { + } catch (const std::exception& e) { m_sys_vendor = ""; - LOG_DEBUG("Can not read bios_description", e); + LOG_DEBUG("Can not read bios_description %s", e.what()); } } -- Gitblit v1.9.1