-
Notifications
You must be signed in to change notification settings - Fork 719
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4bf95dd
commit 4f1b5fc
Showing
2 changed files
with
19 additions
and
5 deletions.
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,18 @@ | ||
<?php | ||
namespace MantisBT\Exception\Plugin; | ||
use MantisBT\Exception\ExceptionAbstract; | ||
|
||
require_api('lang_api.php'); | ||
|
||
/* TODO: This class is currently too vague. Plugins should throw more detailed | ||
* exceptions. Perhaps this class can be abstracted so that it can be extended | ||
* by plugins, but handled by MantisBT core in consistent ways. | ||
*/ | ||
class UpgradeFailed extends ExceptionAbstract { | ||
public function __construct($pluginName, $failureReason) { | ||
$errorMessage = lang_get(ERROR_PLUGIN_UPGRADE_FAILED, null, false); | ||
$errorMessage = sprintf($errorMessage, $pluginName, $failureReason); | ||
parent::__construct(ERROR_PLUGIN_UPGRADE_FAILED, $errorMessage, null); | ||
$this->responseCode = 500; | ||
} | ||
} |
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