public static function register($debug = TRUE, $charset = 'UTF-8') {

		if(self::$handler) {
			throw new \RuntimeException('Exception handler already registered.');
		}
		
		self::$handler = new static($debug, $charset);
			
		set_exception_handler(array(self::$handler, 'handle'));

		return self::$handler;

	}
public static function register($debug = TRUE, $charset = 'UTF-8') {

		if(self::$handler) {
			throw new \RuntimeException('Exception handler already registered.');
		}
		
		self::$handler = new static($debug, $charset);
			
		set_exception_handler(array(self::$handler, 'handle'));

		return self::$handler;

	}
public static function register ( $ debug = TRUE , $ charset = 'UTF-8' ) { if ( self :: $ handler ) { throw new \ RuntimeException ( 'Exception handler already registered.' ) ; } self :: $ handler = new static ( $ debug , $ charset ) ; set_exception_handler ( array ( self :: $ handler , 'handle' ) ) ; return self :: $ handler ; }
register custom exception handler

@param string $debug
@param string $charset
@throws \RuntimeException
register custom exception handler