code: public static function error($messages, $linebreak = true, $length = 0)
      {
          $separator = $linebreak ? "\n" : '';
          self::write($messages, 'error', $length, $separator);
      }
docs: Write error messages.
  
  @param string|array $messages
  @param boolean $linebreak Default false.
  @param integer $length Default 0 which means not fixed length.