@@ -620,9 +620,9 @@ DPCTLKernelBundle_CreateFromSpirv(__dpctl_keep const DPCTLSyclContextRef CtxRef,
620620 break ;
621621#endif
622622 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__);
626626 break ;
627627 }
628628 return KBRef;
@@ -700,9 +700,9 @@ DPCTLKernelBundle_GetKernel(__dpctl_keep DPCTLSyclKernelBundleRef KBRef,
700700 return _GetKernel_ze_impl (*SyclKB, KernelName);
701701#endif
702702 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__);
706706 return nullptr ;
707707 }
708708}
@@ -730,9 +730,9 @@ bool DPCTLKernelBundle_HasKernel(__dpctl_keep DPCTLSyclKernelBundleRef KBRef,
730730 return _HasKernel_ze_impl (*SyclKB, KernelName);
731731#endif
732732 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__);
736736 return false ;
737737 }
738738}
0 commit comments