Example #1
0
 public static function getErrorCode(Exception $e)
 {
     if ($e instanceof Kaltura_AdminException) {
         return $e->getPrefix() . ':' . $e->getCode();
     }
     if ($e instanceof Kaltura_Client_Exception) {
         return 'Server:' . $e->getCode();
     }
     if ($e instanceof Kaltura_Client_ClientException) {
         return 'API:' . $e->getCode();
     }
     if ($e instanceof Infra_Exception) {
         return 'UI-Infra:' . $e->getCode();
     }
     if ($e instanceof Zend_Exception) {
         return 'Zend:' . $e->getCode();
     }
     return 'Runtime:' . $e->getCode();
 }