Adding adapters for Workflow->Bpmn and Bpmn->Workflow projects, and more updates & fixes

This commit is contained in:
Erik Amaru Ortiz
2014-02-05 17:29:28 -04:00
parent 70bbc3cdde
commit 9c8d66ef07
11 changed files with 225 additions and 58 deletions

View File

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