Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Adding non-zero exit codes to ErrorHandler in the console. Fixes #1468

  • Loading branch information...
commit a0a87ade5ad308c36baf9ede9cf7d96e666acb95 1 parent ab337e2
@markstory markstory authored
Showing with 15 additions and 15 deletions.
  1. +15 −15 cake/console/error.php
View
30 cake/console/error.php
@@ -63,7 +63,7 @@ function __construct($method, $messages) {
function error($params) {
extract($params, EXTR_OVERWRITE);
$this->stderr($code . $name . $message."\n");
- $this->_stop();
+ $this->_stop(1);
}
/**
@@ -79,7 +79,7 @@ function error404($params) {
'name' => 'Not found',
'message' => sprintf(__("The requested address %s was not found on this server.", true), $url, $message)
));
- $this->_stop();
+ $this->_stop(1);
}
/**
@@ -92,7 +92,7 @@ function missingController($params) {
extract($params, EXTR_OVERWRITE);
$controllerName = str_replace('Controller', '', $className);
$this->stderr(sprintf(__("Missing Controller '%s'", true), $controllerName));
- $this->_stop();
+ $this->_stop(1);
}
/**
@@ -104,7 +104,7 @@ function missingController($params) {
function missingAction($params) {
extract($params, EXTR_OVERWRITE);
$this->stderr(sprintf(__("Missing Method '%s' in '%s'", true), $action, $className));
- $this->_stop();
+ $this->_stop(1);
}
/**
@@ -116,7 +116,7 @@ function missingAction($params) {
function privateAction($params) {
extract($params, EXTR_OVERWRITE);
$this->stderr(sprintf(__("Trying to access private method '%s' in '%s'", true), $action, $className));
- $this->_stop();
+ $this->_stop(1);
}
/**
@@ -128,7 +128,7 @@ function privateAction($params) {
function missingTable($params) {
extract($params, EXTR_OVERWRITE);
$this->stderr(sprintf(__("Missing database table '%s' for model '%s'", true), $table, $className));
- $this->_stop();
+ $this->_stop(1);
}
/**
@@ -139,7 +139,7 @@ function missingTable($params) {
*/
function missingDatabase($params = array()) {
$this->stderr(__("Missing Database", true));
- $this->_stop();
+ $this->_stop(1);
}
/**
@@ -151,7 +151,7 @@ function missingDatabase($params = array()) {
function missingView($params) {
extract($params, EXTR_OVERWRITE);
$this->stderr(sprintf(__("Missing View '%s' for '%s' in '%s'", true), $file, $action, $className));
- $this->_stop();
+ $this->_stop(1);
}
/**
@@ -163,7 +163,7 @@ function missingView($params) {
function missingLayout($params) {
extract($params, EXTR_OVERWRITE);
$this->stderr(sprintf(__("Missing Layout '%s'", true), $file));
- $this->_stop();
+ $this->_stop(1);
}
/**
@@ -175,7 +175,7 @@ function missingLayout($params) {
function missingConnection($params) {
extract($params, EXTR_OVERWRITE);
$this->stderr(__("Missing Database Connection. Try 'cake bake'", true));
- $this->_stop();
+ $this->_stop(1);
}
/**
@@ -187,7 +187,7 @@ function missingConnection($params) {
function missingHelperFile($params) {
extract($params, EXTR_OVERWRITE);
$this->stderr(sprintf(__("Missing Helper file '%s' for '%s'", true), $file, Inflector::camelize($helper)));
- $this->_stop();
+ $this->_stop(1);
}
/**
@@ -199,7 +199,7 @@ function missingHelperFile($params) {
function missingHelperClass($params) {
extract($params, EXTR_OVERWRITE);
$this->stderr(sprintf(__("Missing Helper class '%s' in '%s'", true), Inflector::camelize($helper), $file));
- $this->_stop();
+ $this->_stop(1);
}
/**
@@ -211,7 +211,7 @@ function missingHelperClass($params) {
function missingComponentFile($params) {
extract($params, EXTR_OVERWRITE);
$this->stderr(sprintf(__("Missing Component file '%s' for '%s'", true), $file, Inflector::camelize($component)));
- $this->_stop();
+ $this->_stop(1);
}
/**
@@ -223,7 +223,7 @@ function missingComponentFile($params) {
function missingComponentClass($params) {
extract($params, EXTR_OVERWRITE);
$this->stderr(sprintf(__("Missing Component class '%s' in '%s'", true), Inflector::camelize($component), $file));
- $this->_stop();
+ $this->_stop(1);
}
/**
@@ -235,7 +235,7 @@ function missingComponentClass($params) {
function missingModel($params) {
extract($params, EXTR_OVERWRITE);
$this->stderr(sprintf(__("Missing model '%s'", true), $className));
- $this->_stop();
+ $this->_stop(1);
}
/**
Please sign in to comment.
Something went wrong with that request. Please try again.