Consistent use of Shell::err for errors

This commit is contained in:
Mischa ter Smitten 2014-05-27 12:29:09 +02:00
parent a0851702ff
commit 329fd3fe4c

View file

@ -127,7 +127,7 @@ class ExtractTask extends AppShell {
); );
$response = $this->in($message, null, $defaultPath); $response = $this->in($message, null, $defaultPath);
if (strtoupper($response) === 'Q') { if (strtoupper($response) === 'Q') {
$this->out(__d('cake_console', 'Extract Aborted')); $this->err(__d('cake_console', 'Extract Aborted'));
return $this->_stop(); return $this->_stop();
} elseif (strtoupper($response) === 'D' && count($this->_paths)) { } elseif (strtoupper($response) === 'D' && count($this->_paths)) {
$this->out(); $this->out();
@ -204,7 +204,7 @@ class ExtractTask extends AppShell {
while (true) { while (true) {
$response = $this->in($message, null, rtrim($this->_paths[0], DS) . DS . 'Locale'); $response = $this->in($message, null, rtrim($this->_paths[0], DS) . DS . 'Locale');
if (strtoupper($response) === 'Q') { if (strtoupper($response) === 'Q') {
$this->out(__d('cake_console', 'Extract Aborted')); $this->err(__d('cake_console', 'Extract Aborted'));
return $this->_stop(); return $this->_stop();
} elseif ($this->_isPathUsable($response)) { } elseif ($this->_isPathUsable($response)) {
$this->_output = $response . DS; $this->_output = $response . DS;
@ -734,16 +734,16 @@ class ExtractTask extends AppShell {
* @return void * @return void
*/ */
protected function _markerError($file, $line, $marker, $count) { 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; $count += 2;
$tokenCount = count($this->_tokens); $tokenCount = count($this->_tokens);
$parenthesis = 1; $parenthesis = 1;
while ((($tokenCount - $count) > 0) && $parenthesis) { while ((($tokenCount - $count) > 0) && $parenthesis) {
if (is_array($this->_tokens[$count])) { if (is_array($this->_tokens[$count])) {
$this->out($this->_tokens[$count][1], false); $this->err($this->_tokens[$count][1], false);
} else { } else {
$this->out($this->_tokens[$count], false); $this->err($this->_tokens[$count], false);
if ($this->_tokens[$count] === '(') { if ($this->_tokens[$count] === '(') {
$parenthesis++; $parenthesis++;
} }
@ -754,7 +754,7 @@ class ExtractTask extends AppShell {
} }
$count++; $count++;
} }
$this->out("\n", true); $this->err("\n", true);
} }
/** /**