diff options
| author | EoleDev <EoleDev@outlook.fr> | 2016-04-26 20:42:31 +0200 |
|---|---|---|
| committer | EoleDev <EoleDev@outlook.fr> | 2016-04-26 20:42:31 +0200 |
| commit | 5263cf00a253891396c442fe5be29762fb8be50d (patch) | |
| tree | 36adbdf4ccefaf85fe0ffb9c08c44f2fb8221da6 /server/core/ErrorManagement.php | |
| parent | 477dc821824b422c11d0d34b644de4b68a596510 (diff) | |
Refactoring of comments beginning
Diffstat (limited to 'server/core/ErrorManagement.php')
| -rwxr-xr-x | server/core/ErrorManagement.php | 66 |
1 files changed, 33 insertions, 33 deletions
diff --git a/server/core/ErrorManagement.php b/server/core/ErrorManagement.php index be7080b..0e315a7 100755 --- a/server/core/ErrorManagement.php +++ b/server/core/ErrorManagement.php @@ -22,9 +22,9 @@ Class errorManagement{ /**
* ErrorManagemement constructor
*
- * @param App $app the main app object
+ * @param App $args the main app object
*
- * @return ErrorManagement
+ * @return ErrorManagement Object
*/
public function __construct($args){
@@ -35,9 +35,9 @@ Class errorManagement{ /**
* Put an error message corresponding to a base error in the output
*
- * @param $error the error triggered
+ * @param Exception $error the exception triggered
*
- * @return String BaseError message
+ * @return NULL
*/
public function BaseErrorHandler($error){
$this->app->setOutput("Error", "BaseError");
@@ -46,49 +46,49 @@ Class errorManagement{ /**
* Put an error message corresponding to a bad response in function of the status code in the output
*
- * @param $error the error triggered
+ * @param Exception $error the exception triggered
*
- * @return String Error message
+ * @return NULL
*/
public function BadResponseHandler($error){
$statusCode = $error->getResponse()->getStatusCode();
switch ($statusCode) {
- case 400:
- $this->app->setOutput("Error", "Invalid input.");
- break;
+ case 400:
+ $this->app->setOutput("Error", "Invalid input.");
+ break;
- case 401:
- $this->app->setOutput("Error", "Authentification failed.");
- break;
+ case 401:
+ $this->app->setOutput("Error", "Authentification failed.");
+ break;
- case 403:
- $this->app->setOutput("Error", "Operation forbidden.");
- break;
+ case 403:
+ $this->app->setOutput("Error", "Operation forbidden.");
+ break;
- case 404:
- $this->app->setOutput("Error", "Ressource not found.");
- break;
+ case 404:
+ $this->app->setOutput("Error", "Ressource not found.");
+ break;
- case 500:
- $this->app->setOutput("Error", "Internal server error, please contact an administrator.");
- break;
+ case 500:
+ $this->app->setOutput("Error", "Internal server error, please contact an administrator.");
+ break;
- case 503:
- $this->app->setOutput("Error", "Service unvailable for the moment.");
- break;
+ case 503:
+ $this->app->setOutput("Error", "Service unvailable for the moment.");
+ break;
- default:
- $this->app->setOutput("Error", "Unknow error, please contact an administrator.");
- break;
+ default:
+ $this->app->setOutput("Error", "Unknow error, please contact an administrator.");
+ break;
}
}
/**
* Put an error message corresponding to a not implemented yet error in the output
*
- * @param $error the error triggered
+ * @param Exception $error the exception triggered
*
- * @return String internal error message
+ * @return NULL
*/
public function NotImplementedHandler($error){
$this->app->setOutput("Error", "Internal error (not implemented yet), please contact an administrator");
@@ -97,9 +97,9 @@ Class errorManagement{ /**
* Put an error message corresponding to a user input error in the output
*
- * @param $error the error triggered
+ * @param Exception $error the exception triggered
*
- * @return String User input error message
+ * @return NULL
*/
public function UserInputHandler($error){
$this->app->setOutput("Error", "UserInputError");
@@ -108,9 +108,9 @@ Class errorManagement{ /**
* Put an error message corresponding to an other error in the output
*
- * @param $error the error triggered
+ * @param Exception $error the exception triggered
*
- * @return String error message
+ * @return NULL
*/
public function OtherException($error){
$this->app->setOutput("Error", $error->getMessage());
|
