From b626424800448e033757d695ca85c0368a5eb433 Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Fri, 13 Oct 2017 19:00:37 -0400 Subject: [PATCH] bpf translator: catch runtime_errors Some simple test cases can run up against bpf-translate limitations. Those that are signalled with a runtime_error exception need to be caught at least in translate_bpf_pass() and a message improvised, so that there is something more to go on than an anonymous pass-4 failure. --- bpf-translate.cxx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bpf-translate.cxx b/bpf-translate.cxx index e8f5bf149..7dfbf00e6 100644 --- a/bpf-translate.cxx +++ b/bpf-translate.cxx @@ -2291,8 +2291,14 @@ translate_bpf_pass (systemtap_session& s) s.print_error(e); ret = 1; } + catch (const std::runtime_error &e) + { + std::cerr << "bpf translation internal error: " << e.what() << std::endl; + ret = 1; + } catch (...) { + std::cerr << "bpf translation internal error" << std::endl; ret = 1; } -- 2.43.5