#include "mix_cc/utility/read_config.h" #include "mix_cc/debug.h" #include "mix_cc/json.h" #include "mix_cc/utility/config.h" #include #include #include #include namespace mix_cc { maybe read_config_maybe(std::string&& category, std::string&& entry) { try { auto data = fp::read_text_file(CONFIG_FILE_PATH)(); return json::parse(data).at(category).at(entry); } catch (std::exception& e) { DEBUG_PRINT_MIX_CC(e.what()); return {}; } catch (...) { DEBUG_PRINT_MIX_CC("read json config file failure with unknown error"); return {}; } } } // namespace mix_cc