Permalink
Browse files

Merge branch 'release/2.2.4'

  • Loading branch information...
2 parents d719d27 + 47d5a0c commit 1887a8c92da63e661c391e626b0a4225dff4143f @everzet everzet committed Aug 3, 2012
Showing with 15 additions and 1 deletion.
  1. +5 −0 CHANGES.md
  2. +10 −1 src/Behat/Gherkin/Gherkin.php
View
@@ -1,3 +1,8 @@
+2.2.4 / 2012-08-03
+==================
+
+ * Fixed exception message for "no loader found"
+
2.2.3 / 2012-08-03
==================
@@ -94,7 +94,16 @@ public function load($resource, array $filters = array())
$loader = $this->resolveLoader($resource);
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);

0 comments on commit 1887a8c

Please sign in to comment.