ErrorException {#1505 #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);
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);
}
}
$record = $this->processRecord($record);
}
$record->formatted = $this->getFormatter()->format($record);
$this->write($record);
return false === $this->bubble;
}
/**
&& \in_array($record->context['exception']::class, $this->excludeExceptionList, true)
) {
return true;
}
return $this->handler->handle($record);
}
}
$record->extra,
$record->formatted
);
}
return $this->handler->handle($record);
}
}
* {@inheritdoc}
*/
public function handle(LogRecord $record): bool
{
if ($record->channel !== 'business_events') {
return $this->handler->handle($record);
}
// exclude if the flow event is in excluded list
if (\in_array($record->message, $this->excludeEvents, true)) {
return true;
}
if ($this->activationStrategy->isHandlerActivated($record)) {
$this->activate();
}
} else {
$this->getHandler($record)->handle($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);
}
$level = static::toMonologLevel($level);
}
$this->addRecord($level, (string) $message, $context);
}
/**
* Adds a log record at the DEBUG level.
*
return;
}
$logLevel ??= $this->resolveLogLevel($exception);
$this->logger->log($logLevel, $message, ['exception' => $exception]);
}
/**
* Resolves the level to be used when logging the exception.
*/
} while ($class = $class->getParentClass());
}
$e = FlattenException::createFromThrowable($throwable);
$this->logException($throwable, sprintf('Uncaught PHP Exception %s: "%s" at %s line %s', $e->getClass(), $e->getMessage(), basename($e->getFile()), $e->getLine()), $logLevel);
}
/**
* @return void
*/
$this->priority ??= $dispatcher->getListenerPriority($eventName, $this->listener);
$e = $this->stopwatch->start($this->name, 'event_listener');
try {
($this->optimizedListener ?? $this->listener)($event, $eventName, $dispatcher);
} finally {
if ($e->isStarted()) {
$e->stop();
}
}
foreach ($listeners as $listener) {
if ($stoppable && $event->isPropagationStopped()) {
break;
}
$listener($event, $eventName, $this);
}
}
/**
* Sorts the internal list of listeners for the given event by priority.
} else {
$listeners = $this->getListeners($eventName);
}
if ($listeners) {
$this->callListeners($listeners, $eventName, $event);
}
return $event;
}
*
* @return TEvent
*/
public function dispatch(object $event, ?string $eventName = null): object
{
$event = $this->dispatcher->dispatch($event, $eventName);
if (!$event instanceof FlowEventAware) {
return $event;
}
) {
}
public function dispatch(object $event, ?string $eventName = null): object
{
$event = $this->dispatcher->dispatch($event, $eventName);
if (EnvironmentHelper::getVariable('DISABLE_EXTENSIONS', false)) {
return $event;
}
}
$this->dispatch($nested, $name);
}
}
return $this->dispatcher->dispatch($event, $eventName);
}
/**
* @param callable $listener can not use native type declaration @see https://github.com/symfony/symfony/issues/42283
*/
try {
$this->beforeDispatch($eventName, $event);
try {
$e = $this->stopwatch->start($eventName, 'section');
try {
$this->dispatcher->dispatch($event, $eventName);
} finally {
if ($e->isStarted()) {
$e->stop();
}
}
* Handles a throwable by trying to convert it to a Response.
*/
private function handleThrowable(\Throwable $e, Request $request, int $type): Response
{
$event = new ExceptionEvent($this, $request, $type, $e);
$this->dispatcher->dispatch($event, KernelEvents::EXCEPTION);
// a listener might have replaced the exception
$e = $event->getThrowable();
if (!$event->hasResponse()) {
if ($pop = $request !== $this->requestStack->getMainRequest()) {
$this->requestStack->push($request);
}
try {
$response = $this->handleThrowable($exception, $request, self::MAIN_REQUEST);
} finally {
if ($pop) {
$this->requestStack->pop();
}
}
if ($hasRun) {
throw $e;
}
$hasRun = true;
$kernel->terminateWithException($e, $request);
};
}
} elseif ($event instanceof ConsoleEvent && $app = $event->getCommand()->getApplication()) {
$output = $event->getOutput();
if ($output instanceof ConsoleOutputInterface) {
$this->exceptionHandler = null;
}
try {
if (null !== $exceptionHandler) {
$exceptionHandler($exception);
return;
}
$handlerException ??= $exception;
} catch (\Throwable $handlerException) {
ErrorException
|
---|
ErrorException: Notice: fwrite(): Write of 586 bytes failed with errno=28 No space left on device at /mnt/webroot/wwww/update.krono-shop.com/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:162 at Monolog\Handler\StreamHandler->streamWrite(resource, object(LogRecord)) (/mnt/webroot/wwww/update.krono-shop.com/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:149) at Monolog\Handler\StreamHandler->write(object(LogRecord)) (/mnt/webroot/wwww/update.krono-shop.com/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php:44) at Monolog\Handler\AbstractProcessingHandler->handle(object(LogRecord)) (/mnt/webroot/wwww/update.krono-shop.com/vendor/shopware/core/Framework/Log/Monolog/ExcludeExceptionHandler.php:38) at Shopware\Core\Framework\Log\Monolog\ExcludeExceptionHandler->handle(object(LogRecord)) (/mnt/webroot/wwww/update.krono-shop.com/vendor/shopware/core/Framework/Log/Monolog/ErrorCodeLogLevelHandler.php:62) at Shopware\Core\Framework\Log\Monolog\ErrorCodeLogLevelHandler->handle(object(LogRecord)) (/mnt/webroot/wwww/update.krono-shop.com/vendor/shopware/core/Framework/Log/Monolog/ExcludeFlowEventHandler.php:31) at Shopware\Core\Framework\Log\Monolog\ExcludeFlowEventHandler->handle(object(LogRecord)) (/mnt/webroot/wwww/update.krono-shop.com/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossedHandler.php:140) at Monolog\Handler\FingersCrossedHandler->handle(object(LogRecord)) (/mnt/webroot/wwww/update.krono-shop.com/vendor/monolog/monolog/src/Monolog/Logger.php:389) at Monolog\Logger->addRecord(object(Level), 'Uncaught PHP Exception RuntimeException: "Unable to create the storage directory (/mnt/webroot/wwww/update.krono-shop.com/var/cache/dev_hc5f3d27ab6b52e67b75b9bc66a1048c3/profiler/1c/cc)." at FileProfilerStorage.php line 147', array('exception' => object(RuntimeException))) (/mnt/webroot/wwww/update.krono-shop.com/vendor/monolog/monolog/src/Monolog/Logger.php:579) at Monolog\Logger->log(object(Level), 'Uncaught PHP Exception RuntimeException: "Unable to create the storage directory (/mnt/webroot/wwww/update.krono-shop.com/var/cache/dev_hc5f3d27ab6b52e67b75b9bc66a1048c3/profiler/1c/cc)." at FileProfilerStorage.php line 147', array('exception' => object(RuntimeException))) (/mnt/webroot/wwww/update.krono-shop.com/vendor/symfony/http-kernel/EventListener/ErrorListener.php:194) at Symfony\Component\HttpKernel\EventListener\ErrorListener->logException(object(RuntimeException), 'Uncaught PHP Exception RuntimeException: "Unable to create the storage directory (/mnt/webroot/wwww/update.krono-shop.com/var/cache/dev_hc5f3d27ab6b52e67b75b9bc66a1048c3/profiler/1c/cc)." at FileProfilerStorage.php line 147', 'critical') (/mnt/webroot/wwww/update.krono-shop.com/vendor/symfony/http-kernel/EventListener/ErrorListener.php:93) at Symfony\Component\HttpKernel\EventListener\ErrorListener->logKernelException(object(ExceptionEvent), 'kernel.exception', object(TraceableEventDispatcher)) (/mnt/webroot/wwww/update.krono-shop.com/vendor/symfony/event-dispatcher/Debug/WrappedListener.php:116) at Symfony\Component\EventDispatcher\Debug\WrappedListener->__invoke(object(ExceptionEvent), 'kernel.exception', object(TraceableEventDispatcher)) (/mnt/webroot/wwww/update.krono-shop.com/vendor/symfony/event-dispatcher/EventDispatcher.php:220) at Symfony\Component\EventDispatcher\EventDispatcher->callListeners(array(object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener)), 'kernel.exception', object(ExceptionEvent)) (/mnt/webroot/wwww/update.krono-shop.com/vendor/symfony/event-dispatcher/EventDispatcher.php:56) at Symfony\Component\EventDispatcher\EventDispatcher->dispatch(object(ExceptionEvent), 'kernel.exception') (/mnt/webroot/wwww/update.krono-shop.com/vendor/shopware/core/Content/Flow/Dispatching/FlowDispatcher.php:47) at Shopware\Core\Content\Flow\Dispatching\FlowDispatcher->dispatch(object(ExceptionEvent), 'kernel.exception') (/mnt/webroot/wwww/update.krono-shop.com/vendor/shopware/core/Framework/Webhook/WebhookDispatcher.php:70) at Shopware\Core\Framework\Webhook\WebhookDispatcher->dispatch(object(ExceptionEvent), 'kernel.exception') (/mnt/webroot/wwww/update.krono-shop.com/vendor/shopware/core/Framework/Event/NestedEventDispatcher.php:31) at Shopware\Core\Framework\Event\NestedEventDispatcher->dispatch(object(ExceptionEvent), 'kernel.exception') (/mnt/webroot/wwww/update.krono-shop.com/vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php:139) at Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->dispatch(object(ExceptionEvent), 'kernel.exception') (/mnt/webroot/wwww/update.krono-shop.com/vendor/symfony/http-kernel/HttpKernel.php:239) at Symfony\Component\HttpKernel\HttpKernel->handleThrowable(object(RuntimeException), object(Request), 1) (/mnt/webroot/wwww/update.krono-shop.com/vendor/symfony/http-kernel/HttpKernel.php:132) at Symfony\Component\HttpKernel\HttpKernel->terminateWithException(object(RuntimeException), object(Request)) (/mnt/webroot/wwww/update.krono-shop.com/vendor/symfony/http-kernel/EventListener/DebugHandlersListener.php:82) at Symfony\Component\HttpKernel\EventListener\DebugHandlersListener::Symfony\Component\HttpKernel\EventListener\{closure}(object(RuntimeException)) (/mnt/webroot/wwww/update.krono-shop.com/vendor/symfony/error-handler/ErrorHandler.php:531) at Symfony\Component\ErrorHandler\ErrorHandler->handleException(object(RuntimeException)) |