src/classes/CCError.php
public static function _init() 
	{
		// we capture non fatal errors only in dev environments
		if ( ClanCats::in_development() ) 
		{
			// add a hook to the main resposne
			CCEvent::mind( 'response.output', function( $output ) {
				
				if ( strpos( $output, '</body>' ) === false ) 
				{
					return $output;
				}
				
				$table = \UI\Table::create( array(
					 'style'		=> array(
					 	'width'	=> '100%',
					 ),
					 'cellpadding' 	=> '5',
					 'class'			=> 'table debug-table debug-table-errors',
				));
				
				$table->header( array( '#', 'message', 'file' ) );
				
				foreach( \CCError::$non_fatals as $key => $item )
				{
					$table->row( array( 
						$key+1,
						$item->getMessage(),
						CCStr::strip( $item->getFile(), CCROOT ).':'.$item->getLine(), 
					));
				}
			
				return str_replace( '</body>', $table."\n</body>", $output );
			});
		}
	}
public static function _init() 
	{
		// we capture non fatal errors only in dev environments
		if ( ClanCats::in_development() ) 
		{
			// add a hook to the main resposne
			CCEvent::mind( 'response.output', function( $output ) {
				
				if ( strpos( $output, '</body>' ) === false ) 
				{
					return $output;
				}
				
				$table = \UI\Table::create( array(
					 'style'		=> array(
					 	'width'	=> '100%',
					 ),
					 'cellpadding' 	=> '5',
					 'class'			=> 'table debug-table debug-table-errors',
				));
				
				$table->header( array( '#', 'message', 'file' ) );
				
				foreach( \CCError::$non_fatals as $key => $item )
				{
					$table->row( array( 
						$key+1,
						$item->getMessage(),
						CCStr::strip( $item->getFile(), CCROOT ).':'.$item->getLine(), 
					));
				}
			
				return str_replace( '</body>', $table."\n</body>", $output );
			});
		}
	}
public static function _init ( ) { // we capture non fatal errors only in dev environments if ( ClanCats :: in_development ( ) ) { // add a hook to the main resposne CCEvent :: mind ( 'response.output' , function ( $ output ) { if ( strpos ( $ output , '</body>' ) === false ) { return $ output ; } $ table = \ UI \ Table :: create ( array ( 'style' => array ( 'width' => '100%' , ) , 'cellpadding' => '5' , 'class' => 'table debug-table debug-table-errors' , ) ) ; $ table -> header ( array ( '#' , 'message' , 'file' ) ) ; foreach ( \ CCError :: $ non_fatals as $ key => $ item ) { $ table -> row ( array ( $ key + 1 , $ item -> getMessage ( ) , CCStr :: strip ( $ item -> getFile ( ) , CCROOT ) . ':' . $ item -> getLine ( ) , ) ) ; } return str_replace ( '</body>' , $ table . "\n</body>" , $ output ) ; } ) ; } }
error class init

@return void
error class init