/**
  * Create a FirePHP error message
  *
  * @param string $error Name of error
  * @param string $code  Code of error
  * @param string $description Description of error
  * @param string $file File error occured in
  * @param string $line Line error occured on
  * @param string $trace Stack trace at time of error
  * @param string $context context of error
  * @return void
  * @access protected
  */
 function _fireError($error, $code, $description, $file, $line, $trace, $context)
 {
     $name = $error . ' - ' . $description;
     $message = "{$error} {$code} {$description} on line: {$line} in file: {$file}";
     FireCake::group($name);
     FireCake::error($message, $name);
     FireCake::log($context, 'Context');
     FireCake::log($trace, 'Trace');
     FireCake::groupEnd();
 }
Пример #2
0
 /**
  * Create a FirePHP error message
  *
  * @param array $data Data of the error
  * @param array $links  Links for the error
  * @return void
  */
 public static function fireError($data, $links)
 {
     $name = $data['error'] . ' - ' . $data['description'];
     $message = "{$data['error']} {$data['code']} {$data['description']} on line: {$data['line']} in file: {$data['file']}";
     FireCake::group($name);
     FireCake::error($message, $name);
     if (isset($data['context'])) {
         FireCake::log($data['context'], 'Context');
     }
     if (isset($data['trace'])) {
         FireCake::log($data['trace'], 'Trace');
     }
     FireCake::groupEnd();
 }
 /**
  * test Group messages
  *
  * @return void
  */
 public function testGroup()
 {
     FireCake::setOptions(array('includeLineNumbers' => false));
     FireCake::group('test');
     FireCake::info('my info');
     FireCake::groupEnd();
     $this->assertEqual($this->firecake->sentHeaders['X-Wf-1-1-1-1'], '63|[{"Collapsed":"true","Type":"GROUP_START","Label":"test"},null]|');
     $this->assertEqual($this->firecake->sentHeaders['X-Wf-1-1-1-3'], '27|[{"Type":"GROUP_END"},null]|');
     $this->assertEqual($this->firecake->sentHeaders['X-Wf-1-Index'], 3);
 }
 /**
  * Start a panel which is a 'Group' in FirePHP
  *
  * @param $title
  * @param $anchor
  * @return void
  */
 public function panelStart($title, $anchor)
 {
     FireCake::group($title);
 }
Пример #5
0
/**
 * Create a FirePHP error message
 *
 * @param string $error Name of error
 * @param string $code  Code of error
 * @param string $description Description of error
 * @param string $file File error occured in
 * @param string $line Line error occured on
 * @param string $trace Stack trace at time of error
 * @param string $context context of error
 * @return void
 */
	protected function _fireError($error, $code, $description, $file, $line, $trace, $context) {
		$name = $error . ' - ' . $description;
		$message = "$error $code $description on line: $line in file: $file";
		FireCake::group($name);
		FireCake::error($message, $name);
		FireCake::log($context, 'Context');
		FireCake::log($trace, 'Trace');
		FireCake::groupEnd();
	}