<?php get_class(object $object = ?): string
<?php $result = $invoker->invoke($handler, $event, new Context($requestId, 0, '', '')); } catch (Throwable $e) { $io->writeln([ get_class($e) . ': ' . $e->getMessage(), 'Stack trace:', $e->getTraceAsString(), ]);
<?php } catch (Throwable $e) { printf( "Error communicating with PHP-FPM to read the HTTP response. Bref will restart PHP-FPM now. Original exception message: %s %s\n", get_class($e), $e->getMessage() );
<?php { $stackTraceAsArray = explode(PHP_EOL, $error->getTraceAsString()); $errorFormatted = [ 'errorType' => get_class($error), 'errorMessage' => $error->getMessage(), 'stack' => $stackTraceAsArray, ];
<?php do { $previousError = $previousError->getPrevious(); $previousErrors[] = [ 'errorType' => get_class($previousError), 'errorMessage' => $previousError->getMessage(), 'stack' => explode(PHP_EOL, $previousError->getTraceAsString()), ];
<?php $url = "http://{$this->apiUrl}/2018-06-01/runtime/invocation/$invocationId/error"; $this->postJson($url, [ 'errorType' => get_class($error), 'errorMessage' => $error->getMessage(), 'stackTrace' => $stackTraceAsArray, ]);
<?php echo "$message\n"; if ($error) { if ($error instanceof Exception) { $errorMessage = get_class($error) . ': ' . $error->getMessage(); } else { $errorMessage = $error->getMessage(); }
<?php $url = "http://{$this->apiUrl}/2018-06-01/runtime/init/error"; $this->postJson($url, [ 'errorMessage' => $message . ' ' . ($error ? $error->getMessage() : ''), 'errorType' => $error ? get_class($error) : 'Internal', 'stackTrace' => $error ? explode(PHP_EOL, $error->getTraceAsString()) : [], ]);