Commit 549e9fda authored by Alastair Robertson's avatar Alastair Robertson

Cleanly exit when unable to attach a probe

parent a75340a1
......@@ -64,8 +64,16 @@ int BPFtrace::run()
std::cerr << "Code not generated for probe: " << probe.name << std::endl;
return -1;
}
try
{
attached_probes.push_back(std::make_unique<AttachedProbe>(probe, func->second));
}
catch (std::runtime_error e)
{
std::cerr << e.what() << std::endl;
return -1;
}
}
// TODO wait here while script is running
getchar();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment