Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement TagNameNotUnique exception
- Loading branch information
1 parent
d6849a3
commit b2703b0
Showing
2 changed files
with
16 additions
and
1 deletion.
There are no files selected for viewing
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\Tag; | ||
use MantisBT\Exception\ExceptionAbstract; | ||
|
||
require_api('lang_api.php'); | ||
|
||
class TagNameNotUnique extends ExceptionAbstract { | ||
public function __construct($tagName) { | ||
$errorMessage = lang_get(ERROR_TAG_DUPLICATE, null, false); | ||
$errorMessage = sprintf($errorMessage, $tagName); | ||
parent::__construct(ERROR_TAG_DUPLICATE, $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