Skip to content

Commit

Permalink
feat: improve erreur message
Browse files Browse the repository at this point in the history
  • Loading branch information
maxhelias committed Apr 2, 2024
1 parent 8bcb673 commit 42e3184
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/DataCollector/XhprofCollector.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ public function getName(): string

public function collect(Request $request, Response $response, \Throwable $exception = null)
{
if (null === $this->config) {
throw new \RuntimeException('Config file is not defined: run "cp vendor/odandb/xhprof-bundle/php_xhgui_config.php.dist php_xhgui_config.php" to create a config file.');
}

$configArr = $this->config->toArray();
$data = $request->attributes->all('_xhprof_data')['profile'] ?? [];

Expand Down

0 comments on commit 42e3184

Please sign in to comment.