From 3f3f25a3093460f081d0c2edd733c2888a3615bd Mon Sep 17 00:00:00 2001 From: Oleksandr Pavlyk Date: Fri, 26 Aug 2022 09:17:44 -0500 Subject: [PATCH] Improved exception message when SyclDevice could not created from invalid filter string --- dpctl/_sycl_device.pyx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dpctl/_sycl_device.pyx b/dpctl/_sycl_device.pyx index 2da48ef333..3de4a82a0d 100644 --- a/dpctl/_sycl_device.pyx +++ b/dpctl/_sycl_device.pyx @@ -293,7 +293,8 @@ cdef class SyclDevice(_SyclDevice): ret = self._init_from_selector(DSRef) if ret == -1: raise SyclDeviceCreationError( - "Could not create a SyclDevice with the selector string" + "Could not create a SyclDevice with the selector string " + "'{selector_string}'".format(selector_string=arg) ) elif isinstance(arg, _SyclDevice): ret = self._init_from__SyclDevice(arg)