Skip to content

Commit

Permalink
Consistent use of Shell::err for errors
Browse files Browse the repository at this point in the history
  • Loading branch information
tersmitten committed May 27, 2014
1 parent a085170 commit 329fd3f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/Cake/Console/Command/Task/ExtractTask.php
Expand Up @@ -127,7 +127,7 @@ protected function _getPaths() {
);
$response = $this->in($message, null, $defaultPath);
if (strtoupper($response) === 'Q') {
$this->out(__d('cake_console', 'Extract Aborted'));
$this->err(__d('cake_console', 'Extract Aborted'));
return $this->_stop();
} elseif (strtoupper($response) === 'D' && count($this->_paths)) {
$this->out();
Expand Down Expand Up @@ -204,7 +204,7 @@ public function execute() {
while (true) {
$response = $this->in($message, null, rtrim($this->_paths[0], DS) . DS . 'Locale');
if (strtoupper($response) === 'Q') {
$this->out(__d('cake_console', 'Extract Aborted'));
$this->err(__d('cake_console', 'Extract Aborted'));
return $this->_stop();
} elseif ($this->_isPathUsable($response)) {
$this->_output = $response . DS;
Expand Down Expand Up @@ -734,16 +734,16 @@ protected function _formatString($string) {
* @return void
*/
protected function _markerError($file, $line, $marker, $count) {
$this->out(__d('cake_console', "Invalid marker content in %s:%s\n* %s(", $file, $line, $marker));
$this->err(__d('cake_console', "Invalid marker content in %s:%s\n* %s(", $file, $line, $marker));
$count += 2;
$tokenCount = count($this->_tokens);
$parenthesis = 1;

while ((($tokenCount - $count) > 0) && $parenthesis) {
if (is_array($this->_tokens[$count])) {
$this->out($this->_tokens[$count][1], false);
$this->err($this->_tokens[$count][1], false);
} else {
$this->out($this->_tokens[$count], false);
$this->err($this->_tokens[$count], false);
if ($this->_tokens[$count] === '(') {
$parenthesis++;
}
Expand All @@ -754,7 +754,7 @@ protected function _markerError($file, $line, $marker, $count) {
}
$count++;
}
$this->out("\n", true);
$this->err("\n", true);
}

/**
Expand Down

0 comments on commit 329fd3f

Please sign in to comment.