File tree Expand file tree Collapse file tree
src/runtime_src/core/common/runner Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99
1010#include " core/common/config_reader.h"
1111#include " core/common/debug.h"
12+ #include " core/common/error.h"
1213#include " core/common/api/bo_int.h"
1314#include " core/common/api/elf_int.h"
1415#include " core/common/api/hw_context_int.h"
@@ -208,6 +209,7 @@ class frames
208209 }
209210
210211 public:
212+ explicit
211213 run (const xrt::run_impl* hdl)
212214 : m_hdl{hdl}
213215 , m_run{xrt_core::kernel_int::get_run_from_impl (m_hdl)}
@@ -314,6 +316,7 @@ class frames
314316 const xrt::runlist_impl* m_hdl;
315317 std::vector<const run*> m_runs;
316318 public:
319+ explicit
317320 runlist (const xrt::runlist_impl* hdl)
318321 : m_hdl{hdl}
319322 {}
@@ -532,7 +535,13 @@ class frames
532535
533536 ~frames ()
534537 {
535- save_replay_script ();
538+ try {
539+ save_replay_script ();
540+ }
541+ catch (const std::exception& ex) {
542+ xrt_core::send_exception_message (" could not save replay script: " + std::string (ex.what ()));
543+ }
544+
536545 }
537546
538547 std::string
Original file line number Diff line number Diff line change @@ -21,11 +21,13 @@ is_enabled()
2121 return num_frames () < frames;
2222}
2323
24+ // NOLINTBEGIN
2425// No-op when disabled, actual capture when enabled
2526#define XRT_REPLAY_CAPTURE (fn, ...) \
2627 do { if (XRT_UNLIKELY (xrt_core::capture::is_enabled ())) { \
2728 xrt_core::capture::detail::fn (__VA_ARGS__); \
2829 } } while (0 )
30+ // NOLINTEND
2931
3032} // namespace xrt_core::capture
3133
You can’t perform that action at this time.
0 commit comments