@@ -332,11 +332,16 @@ int main() {
332332 " Extensions" );
333333 print_info<info::device::printf_buffer_size, size_t >(dev,
334334 " Printf buffer size" );
335- print_info<info::device::preferred_interop_user_sync, bool >(
336- dev, " Preferred interop user sync" );
335+ try {
336+ print_info<info::device::preferred_interop_user_sync, bool >(
337+ dev, " Preferred interop user sync" );
338+ } catch (sycl::exception &e) {
339+ std::cout << " Expected exception has been caught: " << e.what ()
340+ << std::endl;
341+ }
337342 try {
338343 print_info<info::device::parent_device, device>(dev, " Parent device" );
339- } catch (sycl::exception e) {
344+ } catch (sycl::exception & e) {
340345 std::cout << " Expected exception has been caught: " << e.what ()
341346 << std::endl;
342347 }
@@ -359,7 +364,12 @@ int main() {
359364
360365 std::cout << separator << " Platform information\n " << separator;
361366 platform plt (dev.get_platform ());
362- print_info<info::platform::profile, std::string>(plt, " Profile" );
367+ try {
368+ print_info<info::platform::profile, std::string>(plt, " Profile" );
369+ } catch (sycl::exception &e) {
370+ std::cout << " Expected exception has been caught: " << e.what ()
371+ << std::endl;
372+ }
363373 print_info<info::platform::version, std::string>(plt, " Version" );
364374 print_info<info::platform::name, std::string>(plt, " Name" );
365375 print_info<info::platform::vendor, std::string>(plt, " Vendor" );
0 commit comments