Browse Source

Better Exception Message

Ivan Rey 14 years ago
parent
commit
ef81002634

+ 1 - 1
src/Symfony/Bundle/DoctrineBundle/Command/DoctrineCommand.php

@@ -169,7 +169,7 @@ abstract class DoctrineCommand extends Command
         $destination = str_replace('/'.$path, "", $search, $c);
 
         if ($c != 1) {
-            throw new \RuntimeException("Something went terribly wrong.");
+            throw new \RuntimeException("Can't find base path for bundle. Path: $path , Destination: $destination");
         }
 
         return $destination;

+ 1 - 1
src/Symfony/Bundle/DoctrineMongoDBBundle/Command/DoctrineODMCommand.php

@@ -113,7 +113,7 @@ abstract class DoctrineODMCommand extends Command
         $destination = str_replace('/'.$path, "", $search, $c);
 
         if ($c != 1) {
-            throw new \RuntimeException("Something went terribly wrong.");
+            throw new \RuntimeException("Can't find base path for bundle. Path: $path , Destination: $destination");
         }
 
         return $destination;