End of comments
This commit is contained in:
parent
5263cf00a2
commit
1d42345e07
13 changed files with 491 additions and 264 deletions
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* File containing the Errormanagement Class.
|
||||
* File containing the errorManagement Class.
|
||||
*
|
||||
* @version 1.0 Initialisation of this file
|
||||
* @since 1.0 Core application's file
|
||||
|
@ -14,8 +14,14 @@ use OpenCloud\Common\Error\BaseError;
|
|||
use OpenCloud\Common\Error\NotImplementedError;
|
||||
use OpenCloud\Common\Error\UserInputError;
|
||||
|
||||
|
||||
/**
|
||||
* errorManagement Class of the back-end application
|
||||
*
|
||||
* Management of error
|
||||
*
|
||||
*/
|
||||
Class errorManagement{
|
||||
|
||||
/** @var App $app protected, contains the main app object */
|
||||
protected $app;
|
||||
|
||||
|
@ -37,7 +43,7 @@ Class errorManagement{
|
|||
*
|
||||
* @param Exception $error the exception triggered
|
||||
*
|
||||
* @return NULL
|
||||
* @return void
|
||||
*/
|
||||
public function BaseErrorHandler($error){
|
||||
$this->app->setOutput("Error", "BaseError");
|
||||
|
@ -48,7 +54,7 @@ Class errorManagement{
|
|||
*
|
||||
* @param Exception $error the exception triggered
|
||||
*
|
||||
* @return NULL
|
||||
* @return void
|
||||
*/
|
||||
public function BadResponseHandler($error){
|
||||
$statusCode = $error->getResponse()->getStatusCode();
|
||||
|
@ -88,7 +94,7 @@ Class errorManagement{
|
|||
*
|
||||
* @param Exception $error the exception triggered
|
||||
*
|
||||
* @return NULL
|
||||
* @return void
|
||||
*/
|
||||
public function NotImplementedHandler($error){
|
||||
$this->app->setOutput("Error", "Internal error (not implemented yet), please contact an administrator");
|
||||
|
@ -99,7 +105,7 @@ Class errorManagement{
|
|||
*
|
||||
* @param Exception $error the exception triggered
|
||||
*
|
||||
* @return NULL
|
||||
* @return void
|
||||
*/
|
||||
public function UserInputHandler($error){
|
||||
$this->app->setOutput("Error", "UserInputError");
|
||||
|
@ -110,7 +116,7 @@ Class errorManagement{
|
|||
*
|
||||
* @param Exception $error the exception triggered
|
||||
*
|
||||
* @return NULL
|
||||
* @return void
|
||||
*/
|
||||
public function OtherException($error){
|
||||
$this->app->setOutput("Error", $error->getMessage());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue