/var/www/space1/web241/lms/Services/Init/classes/class.ilErrorHandling.php
protected function getWhoops() {
return new Run();
}
/**
* Is the DEVMODE switched on?
* @return bool
*/
protected function isDevmodeActive() {
return DEVMODE;
}
/**
* Get a default error handler.
* @return Whoops\Handler
*/
protected function defaultHandler() {
// php7-todo : alex, 1.3.2016: Exception -> Throwable, please check
return new CallbackHandler(function($exception, Inspector $inspector, Run $run) {
global $lng;
/var/www/space1/web241/lms/Services/Init/classes/class.ilErrorHandling.php
protected function getWhoops() {
return new Run();
}
/**
* Is the DEVMODE switched on?
* @return bool
*/
protected function isDevmodeActive() {
return DEVMODE;
}
/**
* Get a default error handler.
* @return Whoops\Handler
*/
protected function defaultHandler() {
// php7-todo : alex, 1.3.2016: Exception -> Throwable, please check
return new CallbackHandler(function($exception, Inspector $inspector, Run $run) {
global $lng;
/var/www/space1/web241/lms/Services/Init/classes/class.ilErrorHandling.php
*
* @return Whoops\Handler
*/
public function getHandler() {
// TODO: * Use Whoops in production mode? This would require an appropriate
// error-handler.
// * Check for context? The current implementation e.g. would output HTML for
// for SOAP.
if ($this->isDevmodeActive()) {
return $this->devmodeHandler();
}
return $this->defaultHandler();
}
function getLastError()
{
return $this->error_obj;
}
/var/www/space1/web241/lms/Services/Exceptions/classes/class.ilDelegatingHandler.php
* that handler.
*
* @return int|null A handler may return nothing, or a Handler::HANDLE_* constant
*/
public function handle() {
if (defined("IL_INITIAL_WD"))
{
chdir(IL_INITIAL_WD);
}
$handler = $this->error_handling->getHandler();
$handler->setRun($this->getRun());
$handler->setException($this->getException());
$handler->setInspector($this->getInspector());
$handler->handle();
}
}
?>
/var/www/space1/web241/lms/libs/composer/vendor/filp/whoops/src/Whoops/Run.php
foreach (array_reverse($this->handlerStack) as $handler) {
$handler->setRun($this);
$handler->setInspector($inspector);
$handler->setException($exception);
// The HandlerInterface does not require an Exception passed to handle()
// and neither of our bundled handlers use it.
// However, 3rd party handlers may have already relied on this parameter,
// and removing it would be possibly breaking for users.
$handlerResponse = $handler->handle($exception);
if (in_array($handlerResponse, array(Handler::LAST_HANDLER, Handler::QUIT))) {
// The Handler has handled the exception in some way, and
// wishes to quit execution (Handler::QUIT), or skip any
// other handlers (Handler::LAST_HANDLER). If $this->allowQuit
// is false, Handler::QUIT behaves like Handler::LAST_HANDLER
break;
}
}
/var/www/space1/web241/lms/libs/composer/vendor/filp/whoops/src/Whoops/Run.php
}
}
// XXX we pass $level for the "code" param only for BC reasons.
// see https://github.com/filp/whoops/issues/267
$exception = new ErrorException($message, /*code*/ $level, /*severity*/ $level, $file, $line);
if ($this->canThrowExceptions) {
throw $exception;
} else {
$this->handleException($exception);
}
// Do not propagate errors which were already handled by Whoops.
return true;
}
// Propagate error to the next handler, allows error_get_last() to
// work on silenced errors.
return false;
}
/var/www/space1/web241/lms/libs/composer/vendor/filp/whoops/src/Whoops/Run.php
$error = $this->system->getLastError();
if ($error && Misc::isLevelFatal($error['type'])) {
// If there was a fatal error,
// it was not handled in handleError yet.
$this->handleError(
$error['type'],
$error['message'],
$error['file'],
$error['line']
);
}
}
/**
* In certain scenarios, like in shutdown handler, we can not throw exceptions
* @var bool
*/
private $canThrowExceptions = true;