Skip to content

Commit 9d5faab

Browse files
committed
[SYCL] Align exception type with the SYCL specification
SYCL spec says that implementation must throw a runtime_error SYCL exception if no device matching the requirement can be found. Signed-off-by: Alexey Bader <[email protected]>
1 parent 68fbd02 commit 9d5faab

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

sycl/source/device_selector.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ device device_selector::select_device() const {
2727
if (res != nullptr)
2828
return *res;
2929

30-
throw cl::sycl::invalid_parameter_error(
31-
"No device of requested type available.");
30+
throw cl::sycl::runtime_error("No device of requested type available.");
3231
}
3332

3433
int default_selector::operator()(const device &dev) const {

0 commit comments

Comments
 (0)