@@ -301,7 +301,7 @@ ur_usm_pool_handle_t_::ur_usm_pool_handle_t_(ur_context_handle_t Context,
301301      break ;
302302    }
303303    default : {
304-       throw  UsmAllocationException ( UR_RESULT_ERROR_INVALID_ARGUMENT) ;
304+       throw  UR_RESULT_ERROR_INVALID_ARGUMENT;
305305    }
306306    }
307307    pNext = BaseDesc->pNext ;
@@ -353,8 +353,8 @@ UR_APIEXPORT ur_result_t UR_APICALL urUSMPoolCreate(
353353  try  {
354354    *Pool = reinterpret_cast <ur_usm_pool_handle_t >(
355355        new  ur_usm_pool_handle_t_ (Context, PoolDesc));
356-   } catch  (const  UsmAllocationException &Ex ) {
357-     return  Ex. getError () ;
356+   } catch  (ur_result_t  e ) {
357+     return  e ;
358358  } catch  (umf_result_t  e) {
359359    return  umf::umf2urResult (e);
360360  } catch  (...) {
@@ -412,7 +412,7 @@ ur_usm_pool_handle_t_::ur_usm_pool_handle_t_(ur_context_handle_t Context,
412412                                             ur_usm_pool_desc_t  *PoolDesc)
413413    : Context{Context}, Device{Device} {
414414  if  (!(PoolDesc->flags  & UR_USM_POOL_FLAG_USE_NATIVE_MEMORY_POOL_EXP))
415-     throw  UsmAllocationException ( UR_RESULT_ERROR_INVALID_ARGUMENT) ;
415+     throw  UR_RESULT_ERROR_INVALID_ARGUMENT;
416416
417417  CUmemPoolProps MemPoolProps{};
418418  size_t  threshold = 0 ;
@@ -451,7 +451,7 @@ ur_usm_pool_handle_t_::ur_usm_pool_handle_t_(ur_context_handle_t Context,
451451      break ;
452452    }
453453    default : {
454-       throw  UsmAllocationException ( UR_RESULT_ERROR_INVALID_ARGUMENT) ;
454+       throw  UR_RESULT_ERROR_INVALID_ARGUMENT;
455455    }
456456    }
457457    pNext = BaseDesc->pNext ;
@@ -487,8 +487,8 @@ urUSMPoolCreateExp(ur_context_handle_t Context, ur_device_handle_t Device,
487487  try  {
488488    *pPool = reinterpret_cast <ur_usm_pool_handle_t >(
489489        new  ur_usm_pool_handle_t_ (Context, Device, pPoolDesc));
490-   } catch  (const  UsmAllocationException &Ex ) {
491-     return  Ex. getError () ;
490+   } catch  (ur_result_t  e ) {
491+     return  e ;
492492  } catch  (...) {
493493    return  UR_RESULT_ERROR_UNKNOWN;
494494  }
0 commit comments