Skip to content

Commit

Permalink
Fix #379: Better error message when no debug data is found
Browse files Browse the repository at this point in the history
  • Loading branch information
Sarke authored and samdark committed Jul 23, 2019
1 parent c8145e6 commit 30c01eb
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
dist: trusty

language: php

php:
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Yii Framework 2 debug extension Change Log
2.1.6 under development
-----------------------

- no changes in this release.
- Enh #379: Better error message when no debug data is found (Sarke)


2.1.5 June 04, 2019
Expand Down
5 changes: 5 additions & 0 deletions src/controllers/DefaultController.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,11 @@ public function actionIndex()

// load latest request
$tags = array_keys($this->getManifest());

if (empty($tags)) {
throw new \Exception("No debug data have been collected yet, try browsing the website first.");
}

$tag = reset($tags);
$this->loadData($tag);

Expand Down

0 comments on commit 30c01eb

Please sign in to comment.