src/PhpConsole/Dispatcher/Errors.php
public function dispatchError($code = null, $text = null, $file = null, $line = null, $ignoreTraceCalls = 0) {
		if($this->isActive()) {
			$message = new ErrorMessage();
			$message->code = $code;
			$message->class = $this->getErrorTypeByCode($code);
			$message->data = $this->dumper->dump($text);
			$message->file = $file;
			$message->line = $line;
			if($ignoreTraceCalls !== null) {
				$message->trace = $this->fetchTrace(debug_backtrace(), $file, $line, is_array($ignoreTraceCalls) ? $ignoreTraceCalls : $ignoreTraceCalls + 1);
			}
			$this->sendMessage($message);
		}
	}
public function dispatchError($code = null, $text = null, $file = null, $line = null, $ignoreTraceCalls = 0) {
		if($this->isActive()) {
			$message = new ErrorMessage();
			$message->code = $code;
			$message->class = $this->getErrorTypeByCode($code);
			$message->data = $this->dumper->dump($text);
			$message->file = $file;
			$message->line = $line;
			if($ignoreTraceCalls !== null) {
				$message->trace = $this->fetchTrace(debug_backtrace(), $file, $line, is_array($ignoreTraceCalls) ? $ignoreTraceCalls : $ignoreTraceCalls + 1);
			}
			$this->sendMessage($message);
		}
	}
public function dispatchError ( $ code = null , $ text = null , $ file = null , $ line = null , $ ignoreTraceCalls = 0 ) { if ( $ this -> isActive ( ) ) { $ message = new ErrorMessage ( ) ; $ message -> code = $ code ; $ message -> class = $ this -> getErrorTypeByCode ( $ code ) ; $ message -> data = $ this -> dumper -> dump ( $ text ) ; $ message -> file = $ file ; $ message -> line = $ line ; if ( $ ignoreTraceCalls !== null ) { $ message -> trace = $ this -> fetchTrace ( debug_backtrace ( ) , $ file , $ line , is_array ( $ ignoreTraceCalls ) ? $ ignoreTraceCalls : $ ignoreTraceCalls + 1 ) ; } $ this -> sendMessage ( $ message ) ; } }
Send error message to client
@param null|integer $code
@param null|string $text
@param null|string $file
@param null|integer $line
@param int|array $ignoreTraceCalls Ignore tracing classes by name prefix `array('PhpConsole')` or fixed number of calls to ignore
Send error message to client