More Bpmn/Workflow handling layer refactoring and improve unit tests

This commit is contained in:
Erik Amaru Ortiz
2014-02-05 11:39:15 -04:00
parent ee480a93e3
commit 47f991034f
12 changed files with 662 additions and 404 deletions

View File

@@ -0,0 +1,20 @@
<?php
namespace ProcessMaker\Exception;
use ProcessMaker\Project;
class ProjectNotFound extends \RuntimeException
{
const EXCEPTION_CODE = 20;
public function __construct(Project\Handler $obj, $uid, $message = "", \Exception $previous = null) {
$message = empty($message) ? sprintf("Project \"%s\" with UID: %s, does not exist.", get_class($obj), $uid) : $message;
parent::__construct($message, self::EXCEPTION_CODE, $previous);
}
public function __toString()
{
return __CLASS__ . ": [{$this->code}]: {$this->message}\n";
}
}