ErrorException {#705 #severity: E_NOTICE }
* Write to stream
* @param resource $stream
*/
protected function streamWrite($stream, LogRecord $record): void
{
fwrite($stream, (string) $record->formatted);
}
private function customErrorHandler(int $code, string $msg): bool
{
$this->errorMessage = preg_replace('{^(fopen|mkdir)\(.*?\): }', '', $msg);
* @return callable
*/
protected function forwardsTo($method)
{
return fn (...$arguments) => static::$app
? $this->{$method}(...$arguments)
: false;
}
/**
* Determine if the error level is a deprecation.
* Write to stream
* @param resource $stream
*/
protected function streamWrite($stream, LogRecord $record): void
{
fwrite($stream, (string) $record->formatted);
}
private function customErrorHandler(int $code, string $msg): bool
{
$this->errorMessage = preg_replace('{^(fopen|mkdir)\(.*?\): }', '', $msg);
if ($this->useLocking) {
// ignoring errors here, there's not much we can do about them
flock($stream, LOCK_EX);
}
$this->streamWrite($stream, $record);
if ($this->useLocking) {
flock($stream, LOCK_UN);
}
}
if ($this->nextRotation <= $record->datetime) {
$this->mustRotate = true;
$this->close();
}
parent::write($record);
}
/**
* Rotates the files.
*/
$record = $this->processRecord($record);
}
$record->formatted = $this->getFormatter()->format($record);
$this->write($record);
return false === $this->bubble;
}
/**
}
// once the record is initialized, send it to all handlers as long as the bubbling chain is not interrupted
try {
$handled = true;
if (true === $handler->handle(clone $record)) {
break;
}
} catch (Throwable $e) {
$this->handleException($e, $record);
* @param string|Stringable $message The log message
* @param mixed[] $context The log context
*/
public function error(string|\Stringable $message, array $context = []): void
{
$this->addRecord(Level::Error, (string) $message, $context);
}
/**
* Adds a log record at the CRITICAL level.
*
* @param array $context
* @return void
*/
protected function writeLog($level, $message, $context): void
{
$this->logger->{$level}(
$message = $this->formatMessage($message),
$context = array_merge($this->context, $context)
);
$this->fireLogEvent($level, $message, $context);
* @param array $context
* @return void
*/
public function error($message, array $context = []): void
{
$this->writeLog(__FUNCTION__, $message, $context);
}
/**
* Log a warning message to the logs.
*
* @param array $context
* @return void
*/
public function error($message, array $context = []): void
{
$this->driver()->error($message, $context);
}
/**
* Exceptional occurrences that are not errors.
*
);
$context = $this->buildExceptionContext($e);
method_exists($logger, $level)
? $logger->{$level}($e->getMessage(), $context)
: $logger->log($level, $e->getMessage(), $context);
}
/**
* Determine if the exception should be reported.
if ($this->shouldntReport($e)) {
return;
}
$this->reportThrowable($e);
}
/**
* Reports error based on report method on exception or to logger.
*
throw $e;
}
$handler = $this->container->make(ExceptionHandler::class);
$handler->report($e);
$response = $handler->render($passable, $e);
if (is_object($response) && method_exists($response, 'withException')) {
$response->withException($e);
{
return function ($passable) use ($destination) {
try {
return $destination($passable);
} catch (Throwable $e) {
return $this->handleException($passable, $e);
}
};
}
/**
]);
});
}
}
return $next($request);
}
}
// since the object we're given was already a fully instantiated object.
$parameters = [$passable, $stack];
}
$carry = method_exists($pipe, $this->method)
? $pipe->{$this->method}(...$parameters)
: $pipe(...$parameters);
return $this->handleCarry($carry);
} catch (Throwable $e) {
return $this->handleException($passable, $e);
if ($psrRequest !== null) {
$container->instance(LaravelRequestFetcher::CONTAINER_PSR7_INSTANCE_KEY, $psrRequest);
}
}
return $next($request);
}
private function resolvePsrRequest(Container $container): ?ServerRequestInterface
{
try {
// since the object we're given was already a fully instantiated object.
$parameters = [$passable, $stack];
}
$carry = method_exists($pipe, $this->method)
? $pipe->{$this->method}(...$parameters)
: $pipe(...$parameters);
return $this->handleCarry($carry);
} catch (Throwable $e) {
return $this->handleException($passable, $e);
*/
public function handle($request, Closure $next)
{
$this->clean($request);
return $next($request);
}
/**
* Clean the request's data.
*
if ($callback($request)) {
return $next($request);
}
}
return parent::handle($request, $next);
}
/**
* Transform the given value.
*
// since the object we're given was already a fully instantiated object.
$parameters = [$passable, $stack];
}
$carry = method_exists($pipe, $this->method)
? $pipe->{$this->method}(...$parameters)
: $pipe(...$parameters);
return $this->handleCarry($carry);
} catch (Throwable $e) {
return $this->handleException($passable, $e);
*/
public function handle($request, Closure $next)
{
$this->clean($request);
return $next($request);
}
/**
* Clean the request's data.
*
if ($callback($request)) {
return $next($request);
}
}
return parent::handle($request, $next);
}
/**
* Transform the given value.
*
// since the object we're given was already a fully instantiated object.
$parameters = [$passable, $stack];
}
$carry = method_exists($pipe, $this->method)
? $pipe->{$this->method}(...$parameters)
: $pipe(...$parameters);
return $this->handleCarry($carry);
} catch (Throwable $e) {
return $this->handleException($passable, $e);
if ($max > 0 && $request->server('CONTENT_LENGTH') > $max) {
throw new PostTooLargeException;
}
return $next($request);
}
/**
* Determine the server 'post_max_size' as bytes.
*
// since the object we're given was already a fully instantiated object.
$parameters = [$passable, $stack];
}
$carry = method_exists($pipe, $this->method)
? $pipe->{$this->method}(...$parameters)
: $pipe(...$parameters);
return $this->handleCarry($carry);
} catch (Throwable $e) {
return $this->handleException($passable, $e);
* @return \Illuminate\Http\Response
*/
public function handle($request, Closure $next)
{
if (! $this->hasMatchingPath($request)) {
return $next($request);
}
$this->cors->setOptions($this->container['config']->get('cors', []));
if ($this->cors->isPreflightRequest($request)) {
// since the object we're given was already a fully instantiated object.
$parameters = [$passable, $stack];
}
$carry = method_exists($pipe, $this->method)
? $pipe->{$this->method}(...$parameters)
: $pipe(...$parameters);
return $this->handleCarry($carry);
} catch (Throwable $e) {
return $this->handleException($passable, $e);
{
if (app()->bound(HubInterface::class)) {
$this->startTransaction($request, app(HubInterface::class));
}
return $next($request);
}
/**
* Handle the application termination.
*
// since the object we're given was already a fully instantiated object.
$parameters = [$passable, $stack];
}
$carry = method_exists($pipe, $this->method)
? $pipe->{$this->method}(...$parameters)
: $pipe(...$parameters);
return $this->handleCarry($carry);
} catch (Throwable $e) {
return $this->handleException($passable, $e);
{
$pipeline = array_reduce(
array_reverse($this->pipes()), $this->carry(), $this->prepareDestination($destination)
);
return $pipeline($this->passable);
}
/**
* Run the pipeline and return the result.
*
$this->bootstrap();
return (new Pipeline($this->app))
->send($request)
->through($this->app->shouldSkipMiddleware() ? [] : $this->middleware)
->then($this->dispatchToRouter());
}
/**
* Bootstrap the application for HTTP requests.
*
$this->requestStartedAt = Carbon::now();
try {
$request->enableHttpMethodParameterOverride();
$response = $this->sendRequestThroughRouter($request);
} catch (Throwable $e) {
$this->reportException($e);
$response = $this->renderException($request, $e);
}
$app = require_once __DIR__.'/../bootstrap/app.php';
$kernel = $app->make(Kernel::class);
$response = $kernel->handle(
$request = Request::capture()
)->send();
$kernel->terminate($request, $response);
ErrorException
|
---|
ErrorException: fwrite(): Write of 7206 bytes failed with errno=28 No space left on device at /home/avtoshina/www/avtoshina.site/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:162 at Illuminate\Foundation\Bootstrap\HandleExceptions->handleError() (/home/avtoshina/www/avtoshina.site/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php:255) at Illuminate\Foundation\Bootstrap\HandleExceptions->Illuminate\Foundation\Bootstrap\{closure}() at fwrite() (/home/avtoshina/www/avtoshina.site/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:162) at Monolog\Handler\StreamHandler->streamWrite() (/home/avtoshina/www/avtoshina.site/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:149) at Monolog\Handler\StreamHandler->write() (/home/avtoshina/www/avtoshina.site/vendor/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php:113) at Monolog\Handler\RotatingFileHandler->write() (/home/avtoshina/www/avtoshina.site/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php:44) at Monolog\Handler\AbstractProcessingHandler->handle() (/home/avtoshina/www/avtoshina.site/vendor/monolog/monolog/src/Monolog/Logger.php:389) at Monolog\Logger->addRecord() (/home/avtoshina/www/avtoshina.site/vendor/monolog/monolog/src/Monolog/Logger.php:644) at Monolog\Logger->error() (/home/avtoshina/www/avtoshina.site/vendor/laravel/framework/src/Illuminate/Log/Logger.php:184) at Illuminate\Log\Logger->writeLog() (/home/avtoshina/www/avtoshina.site/vendor/laravel/framework/src/Illuminate/Log/Logger.php:97) at Illuminate\Log\Logger->error() (/home/avtoshina/www/avtoshina.site/vendor/laravel/framework/src/Illuminate/Log/LogManager.php:681) at Illuminate\Log\LogManager->error() (/home/avtoshina/www/avtoshina.site/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php:317) at Illuminate\Foundation\Exceptions\Handler->reportThrowable() (/home/avtoshina/www/avtoshina.site/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php:278) at Illuminate\Foundation\Exceptions\Handler->report() (/home/avtoshina/www/avtoshina.site/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:49) at Illuminate\Routing\Pipeline->handleException() (/home/avtoshina/www/avtoshina.site/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:146) at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() (/home/avtoshina/www/avtoshina.site/vendor/sentry/sentry-laravel/src/Sentry/Laravel/Http/SetRequestIpMiddleware.php:45) at Sentry\Laravel\Http\SetRequestIpMiddleware->handle() (/home/avtoshina/www/avtoshina.site/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:183) at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() (/home/avtoshina/www/avtoshina.site/vendor/sentry/sentry-laravel/src/Sentry/Laravel/Http/SetRequestMiddleware.php:31) at Sentry\Laravel\Http\SetRequestMiddleware->handle() (/home/avtoshina/www/avtoshina.site/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:183) at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() (/home/avtoshina/www/avtoshina.site/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php:21) at Illuminate\Foundation\Http\Middleware\TransformsRequest->handle() (/home/avtoshina/www/avtoshina.site/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ConvertEmptyStringsToNull.php:31) at Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull->handle() (/home/avtoshina/www/avtoshina.site/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:183) at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() (/home/avtoshina/www/avtoshina.site/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php:21) at Illuminate\Foundation\Http\Middleware\TransformsRequest->handle() (/home/avtoshina/www/avtoshina.site/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php:40) at Illuminate\Foundation\Http\Middleware\TrimStrings->handle() (/home/avtoshina/www/avtoshina.site/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:183) at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() (/home/avtoshina/www/avtoshina.site/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php:27) at Illuminate\Foundation\Http\Middleware\ValidatePostSize->handle() (/home/avtoshina/www/avtoshina.site/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:183) at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() (/home/avtoshina/www/avtoshina.site/vendor/laravel/framework/src/Illuminate/Http/Middleware/HandleCors.php:49) at Illuminate\Http\Middleware\HandleCors->handle() (/home/avtoshina/www/avtoshina.site/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:183) at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() (/home/avtoshina/www/avtoshina.site/vendor/sentry/sentry-laravel/src/Sentry/Laravel/Tracing/Middleware.php:87) at Sentry\Laravel\Tracing\Middleware->handle() (/home/avtoshina/www/avtoshina.site/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:183) at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() (/home/avtoshina/www/avtoshina.site/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:119) at Illuminate\Pipeline\Pipeline->then() (/home/avtoshina/www/avtoshina.site/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:175) at Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter() (/home/avtoshina/www/avtoshina.site/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:144) at Illuminate\Foundation\Http\Kernel->handle() (/home/avtoshina/www/avtoshina.site/public/index.php:51) |