ErrorAction to autodiscoverable file.

This commit is contained in:
Mikael Nordfeldth 2016-01-14 21:21:34 +01:00
parent 818fb05cfe
commit bc0a903bd4
4 changed files with 6 additions and 10 deletions

View File

@ -1457,6 +1457,8 @@ class Action extends HTMLOutputter // lawsuit
break;
default:
common_log(LOG_ERR, 'Handled serverError ('._ve($code).') but cannot output into desired format ('._ve($this->format).'): '._ve($msg));
$action = new ServerErrorAction($msg, $code);
$action->execute();
}
exit((int)$code);
@ -1513,6 +1515,8 @@ class Action extends HTMLOutputter // lawsuit
break;
default:
common_log(LOG_ERR, 'Handled clientError ('._ve($code).') but cannot output into desired format ('._ve($this->format).'): '._ve($msg));
$action = new ClientErrorAction($msg, $code);
$action->execute();
}
exit((int)$code);
}

View File

@ -28,11 +28,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
if (!defined('STATUSNET') && !defined('LACONICA')) {
exit(1);
}
require_once INSTALLDIR . '/lib/error.php';
if (!defined('GNUSOCIAL')) { exit(1); }
/**
* Class for displaying HTTP client errors

View File

@ -29,11 +29,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
if (!defined('STATUSNET') && !defined('LACONICA')) {
exit(1);
}
require_once INSTALLDIR.'/lib/error.php';
if (!defined('GNUSOCIAL')) { exit(1); }
/**
* Class for displaying HTTP server errors