gui\Output::err PHP Method

err() public static method

This method is used to send some text to STDERR
public static err ( string $string ) : void
$string string the text to be sent to STDERR
return void
    public static function err($string)
    {
        fwrite(static::$err, self::colorize($string . PHP_EOL, 'red'));
    }

Usage Example

Example #1
0
 /**
  * Decode a received message
  *
  * @param string $json Received json message
  * @return MessageInterface|void
  * @throws ComponentException
  */
 protected function jsonDecode($json)
 {
     $obj = @json_decode($json);
     if (json_last_error() !== JSON_ERROR_NONE) {
         $strErr = 'JSON ERROR: ' . $json;
         if ($this->application->getVerboseLevel() == 2) {
             Output::err($strErr);
         }
         throw new ComponentException($strErr);
     }
     return $obj;
 }
All Usage Examples Of gui\Output::err