2014-02-05 11:39:15 -04:00
|
|
|
<?php
|
|
|
|
|
namespace ProcessMaker\Exception;
|
|
|
|
|
|
|
|
|
|
use ProcessMaker\Project;
|
|
|
|
|
|
|
|
|
|
class ProjectNotFound extends \RuntimeException
|
|
|
|
|
{
|
2017-08-07 13:50:14 -04:00
|
|
|
const EXCEPTION_CODE = 400;
|
2014-02-05 11:39:15 -04:00
|
|
|
|
|
|
|
|
public function __construct(Project\Handler $obj, $uid, $message = "", \Exception $previous = null) {
|
2022-01-25 15:00:17 -04:00
|
|
|
$message = empty($message) ? 'Project ' . $uid . ', does not exist.' : $message;
|
2014-02-05 11:39:15 -04:00
|
|
|
|
|
|
|
|
parent::__construct($message, self::EXCEPTION_CODE, $previous);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function __toString()
|
|
|
|
|
{
|
|
|
|
|
return __CLASS__ . ": [{$this->code}]: {$this->message}\n";
|
|
|
|
|
}
|
|
|
|
|
}
|