From 4d44c70c327689c02420a797416492befd6dcff0 Mon Sep 17 00:00:00 2001 From: Egor Duplenskii Date: Mon, 19 Dec 2022 11:56:40 +0100 Subject: [PATCH] [CPU] Improve some error messages (#14668) --- src/plugins/intel_cpu/src/cpu_memory.cpp | 2 +- src/plugins/intel_cpu/src/node.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/intel_cpu/src/cpu_memory.cpp b/src/plugins/intel_cpu/src/cpu_memory.cpp index e6369119d5d..ac59fbba6f7 100644 --- a/src/plugins/intel_cpu/src/cpu_memory.cpp +++ b/src/plugins/intel_cpu/src/cpu_memory.cpp @@ -185,7 +185,7 @@ bool MemoryMngrWithReuse::resize(size_t size) { if (size > _memUpperBound) { void *ptr = dnnl::impl::malloc(size, cacheLineSize); if (!ptr) { - throw std::bad_alloc(); + IE_THROW() << "Failed to allocate " << size << " bytes of memory"; } _memUpperBound = size; _useExternalStorage = false; diff --git a/src/plugins/intel_cpu/src/node.h b/src/plugins/intel_cpu/src/node.h index 151b402df36..f41289cc525 100644 --- a/src/plugins/intel_cpu/src/node.h +++ b/src/plugins/intel_cpu/src/node.h @@ -415,7 +415,7 @@ public: } } - IE_THROW() << "Primitive descriptor was not found for node " << getName() << "."; + IE_THROW() << "Primitive descriptor was not found for node " << getName() << " with type " << NameFromType(getType()) << "."; } int getExecIndex() const {