Skip to content

Commit bdadde0

Browse files
committed
changed error code for exception
1 parent 48afb28 commit bdadde0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sycl/source/detail/device_info.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1417,7 +1417,7 @@ get_device_info<info::device::preferred_interop_user_sync>(
14171417
const DeviceImplPtr &Dev) {
14181418
if (Dev->getBackend() != backend::opencl) {
14191419
throw sycl::exception(
1420-
errc::backend_mismatch,
1420+
errc::invalid,
14211421
"the info::device::preferred_interop_user_sync info descriptor can "
14221422
"only be queried with an OpenCL backend");
14231423
}
@@ -1429,7 +1429,7 @@ template <>
14291429
inline typename info::device::profile::return_type
14301430
get_device_info<info::device::profile>(const DeviceImplPtr &Dev) {
14311431
if (Dev->getBackend() != backend::opencl) {
1432-
throw sycl::exception(errc::backend_mismatch,
1432+
throw sycl::exception(errc::invalid,
14331433
"the info::device::profile info descriptor can "
14341434
"only be queried with an OpenCL backend");
14351435
}

0 commit comments

Comments
 (0)