From 7baa79e66018ca407aa86feafe7ac9de5b14e206 Mon Sep 17 00:00:00 2001 From: khaled Date: Fri, 27 Oct 2023 03:56:32 -0500 Subject: [PATCH] Better error message --- numba_dpex/core/runtime/context.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/numba_dpex/core/runtime/context.py b/numba_dpex/core/runtime/context.py index 5ceb4da5ad..fbaf45251b 100644 --- a/numba_dpex/core/runtime/context.py +++ b/numba_dpex/core/runtime/context.py @@ -21,7 +21,9 @@ def _check_null_result(func): @functools.wraps(func) def wrap(self, builder, *args, **kwargs): memptr = func(self, builder, *args, **kwargs) - msg = "USM allocation failed. Check the usm_type and queue." + msg = "In {0:s}.wrap(). USM allocation failed at {1:s}(). Check the usm_type and queue.".format( + self.__class__.__name__, func.__name__ + ) cgutils.guard_memory_error(self._context, builder, memptr, msg=msg) return memptr