Skip to content

Commit

Permalink
Merge branch 'release/2.2.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
everzet committed Aug 3, 2012
2 parents d719d27 + 47d5a0c commit 1887a8c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGES.md
Original file line number Original file line Diff line number Diff line change
@@ -1,3 +1,8 @@
2.2.4 / 2012-08-03
==================

* Fixed exception message for "no loader found"

2.2.3 / 2012-08-03 2.2.3 / 2012-08-03
================== ==================


Expand Down
11 changes: 10 additions & 1 deletion src/Behat/Gherkin/Gherkin.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -94,7 +94,16 @@ public function load($resource, array $filters = array())
$loader = $this->resolveLoader($resource); $loader = $this->resolveLoader($resource);


if (null === $loader) { if (null === $loader) {
throw new \InvalidArgumentException(sprintf('Can\'t find loader for resource: %s', $resource)); if ($resource) {
$message = sprintf('Can\'t find applicable feature loader for: "%s"', $resource);
} else {
$message = sprintf('Can\'t find applicable feature loader');
}

throw new \InvalidArgumentException(
$message."\n".
'Maybe you\'ve forgot to create `features/` folder?'
);
} }


$features = $loader->load($resource); $features = $loader->load($resource);
Expand Down

0 comments on commit 1887a8c

Please sign in to comment.