container: plugins: root: fix example3()'s usage of throw handler

The old macros should *not* have been used in any example; as they
were intended for internal use only.

This was noted in Doxygen ...by not noting them as publicly consumable.
This commit is contained in:
2025-11-20 11:54:18 -08:00
parent ca59169116
commit 9faebb6cea

View File

@@ -108,7 +108,7 @@ void example2()
//! \ingroup cpp_plugin_impl
void example3()
{
namespace common = ::dfi::macro::common;
namespace common = ::dfi::common;
const std::string base{
common::get_env("global_basename") + " "
@@ -122,10 +122,8 @@ void example3()
auto exec_cmd = [&make_cmd](const std::string& cmd) {
// shell 0 = success
THROW_IF(
common::exec("bash -i -c '" + make_cmd(cmd) + "'"),
std::runtime_error,
"command failed")
common::throw_ex_if<common::type::RuntimeError>(
common::exec("bash -i -c '" + make_cmd(cmd) + "'"), "command failed");
};
std::cout << "\nImporting journals...\n";