Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement ProjectNameNotUnique exception
- Loading branch information
1 parent
2712af6
commit dc784c5
Showing
2 changed files
with
16 additions
and
1 deletion.
There are no files selected for viewing
14 changes: 14 additions & 0 deletions
14
application/MantisBT/Exception/Project/ProjectNameNotUnique.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?php | ||
namespace MantisBT\Exception\Project; | ||
use MantisBT\Exception\ExceptionAbstract; | ||
|
||
require_api('lang_api.php'); | ||
|
||
class ProjectNameNotUnique extends ExceptionAbstract { | ||
public function __construct($projectName) { | ||
$errorMessage = lang_get(ERROR_PROJECT_NAME_NOT_UNIQUE, null, false); | ||
$errorMessage = sprintf($errorMessage, $projectName); | ||
parent::__construct(ERROR_PROJECT_NAME_NOT_UNIQUE, $errorMessage, null); | ||
$this->responseCode = 400; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters