예제 #1
0
 private function handleCoreException(kCoreException $ex, category $categoryDb, KalturaCategory $category)
 {
     switch ($ex->getCode()) {
         case kCoreException::DUPLICATE_CATEGORY:
             throw new KalturaAPIException(KalturaErrors::DUPLICATE_CATEGORY, $categoryDb->getFullName());
         case kCoreException::PARENT_ID_IS_CHILD:
             throw new KalturaAPIException(KalturaErrors::PARENT_CATEGORY_IS_CHILD, $category->parentId, $categoryDb->getId());
         default:
             throw $ex;
     }
 }
예제 #2
0
 private function handleCoreException(kCoreException $ex, category $categoryDb, KalturaCategory $category)
 {
     switch ($ex->getCode()) {
         case kCoreException::DUPLICATE_CATEGORY:
             throw new KalturaAPIException(KalturaErrors::DUPLICATE_CATEGORY, $categoryDb->getFullName());
         case kCoreException::PARENT_ID_IS_CHILD:
             throw new KalturaAPIException(KalturaErrors::PARENT_CATEGORY_IS_CHILD, $category->parentId, $categoryDb->getId());
         case kCoreException::DISABLE_CATEGORY_LIMIT_MULTI_PRIVACY_CONTEXT_FORBIDDEN:
             throw new KalturaAPIException(KalturaErrors::CANNOT_SET_MULTI_PRIVACY_CONTEXT);
         default:
             throw $ex;
     }
 }