Skip to content

Commit

Permalink
error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
digitalkaoz committed Jun 12, 2014
1 parent 0632f1e commit 6673774
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/YumlPhp/Request/ClassesRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
namespace YumlPhp\Request;

use TokenReflection\Broker;
use TokenReflection\Exception\BaseException;
use TokenReflection\IReflectionClass;
use TokenReflection\IReflectionMethod;
use TokenReflection\IReflectionProperty;
Expand Down Expand Up @@ -59,13 +60,17 @@ public function configure(array $config)
*/
protected function getClasses()
{
$broker = new Broker(new Broker\Backend\Memory());
$broker->processDirectory(realpath($this->path), $this->config['filter']);
$classes = $broker->getClasses();
try {
$broker = new Broker(new Broker\Backend\Memory());
$broker->processDirectory(realpath($this->path), $this->config['filter']);
$classes = $broker->getClasses();

sort($classes);
sort($classes);

return $classes;
return $classes;
} catch (BaseException $e) {
throw new \RuntimeException($e->getDetail());
}
}

/**
Expand Down

0 comments on commit 6673774

Please sign in to comment.