<commit_before><?php
/**
 * @package KMC
 * @subpackage Errors
 */
class Kaltura_KmcException extends Infra_Exception
{
	const KALTURA_HEADER_ERROR_CODE = 'X-Kaltura-ErrorCode';
	
	
	const ERROR_CODE_NO_IDENTITY = 'NO_IDENTITY';
	const ERROR_CODE_NO_DATA = 'NO_DATA';
	const ERROR_CODE_NO_CATEGORY = 'NO_CATEGORY';
	const ERROR_CODE_PAGE_NOT_FOUND = 'PAGE_NOT_FOUND';
	const ERROR_CODE_MISSING_OPTION = 'MISSING_OPTION';
	
	public function getPrefix()
	{
		return 'KMC';
	}
	
	public static function getErrorCode(Exception $e)
	{
		if($e instanceof Kaltura_HostedException)
			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();<commit_msg>qnd: copy & paste typo<commit_after><?php
/**
 * @package KMC
 * @subpackage Errors
 */
class Kaltura_KmcException extends Infra_Exception
{
	const KALTURA_HEADER_ERROR_CODE = 'X-Kaltura-ErrorCode';
	
	
	const ERROR_CODE_NO_IDENTITY = 'NO_IDENTITY';
	const ERROR_CODE_NO_DATA = 'NO_DATA';
	const ERROR_CODE_NO_CATEGORY = 'NO_CATEGORY';
	const ERROR_CODE_PAGE_NOT_FOUND = 'PAGE_NOT_FOUND';
	const ERROR_CODE_MISSING_OPTION = 'MISSING_OPTION';
	
	public function getPrefix()
	{
		return 'KMC';
	}
	
	public static function getErrorCode(Exception $e)
	{
		if($e instanceof Kaltura_KmcException)
			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();
{'fraction_non_alphanumeric': 0.12966804979253113, 'fraction_numerical': 0.0, 'mean_word_length': 4.656891495601173, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4870050', 'n_tokens_mistral': 764, 'n_tokens_neox': 695, 'n_words': 136}