From 62641013b0004181fc7c402cab6d96d35904aaa4 Mon Sep 17 00:00:00 2001 From: Giovanni LB Date: Mon, 21 Aug 2023 23:34:52 -0300 Subject: [PATCH] SWDEV-414594: Improved error message with metrics create. Change-Id: I3946252efb000f105816a300e638b8338b26defd --- src/core/context.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/context.h b/src/core/context.h index 5186958eb8..3ce46e080d 100644 --- a/src/core/context.h +++ b/src/core/context.h @@ -190,7 +190,8 @@ class Context { if (obj == NULL) EXC_RAISING(HSA_STATUS_ERROR, "allocation error"); try { obj->Construct(agent_info, queue, info, info_count, handler, handler_arg); - } catch (...) { + } catch (std::exception& e) { + std::cerr << e.what() << std::endl; delete obj; obj = NULL; std::cerr << "Error: Context Create failed" << std::endl;