@@ -620,9 +620,9 @@ DPCTLKernelBundle_CreateFromSpirv(__dpctl_keep const DPCTLSyclContextRef CtxRef,
620
620
break ;
621
621
#endif
622
622
default :
623
- error_handler ( " Backend " + std::to_string ( static_cast < int >(BE)) +
624
- " is not supported" ,
625
- __FILE__, __func__, __LINE__);
623
+ std::ostringstream os;
624
+ os << " Backend " << BE << " is not supported" ;
625
+ error_handler (os. str (), __FILE__, __func__, __LINE__);
626
626
break ;
627
627
}
628
628
return KBRef;
@@ -700,9 +700,9 @@ DPCTLKernelBundle_GetKernel(__dpctl_keep DPCTLSyclKernelBundleRef KBRef,
700
700
return _GetKernel_ze_impl (*SyclKB, KernelName);
701
701
#endif
702
702
default :
703
- error_handler ( " Backend " + std::to_string ( static_cast < int >(be)) +
704
- " is not supported. " ,
705
- __FILE__, __func__, __LINE__);
703
+ std::ostringstream os;
704
+ os << " Backend " << be << " is not supported" ;
705
+ error_handler (os. str (), __FILE__, __func__, __LINE__);
706
706
return nullptr ;
707
707
}
708
708
}
@@ -730,9 +730,9 @@ bool DPCTLKernelBundle_HasKernel(__dpctl_keep DPCTLSyclKernelBundleRef KBRef,
730
730
return _HasKernel_ze_impl (*SyclKB, KernelName);
731
731
#endif
732
732
default :
733
- error_handler ( " Backend " + std::to_string ( static_cast < int >(be)) +
734
- " is not supported. " ,
735
- __FILE__, __func__, __LINE__);
733
+ std::ostringstream os;
734
+ os << " Backend " << be << " is not supported" ;
735
+ error_handler (os. str (), __FILE__, __func__, __LINE__);
736
736
return false ;
737
737
}
738
738
}
0 commit comments