2016-02-12 12:45:00 +01:00
|
|
|
<?php
|
|
|
|
|
2016-03-09 15:21:46 +01:00
|
|
|
use OpenCloud\Common\Error\BadResponseError;
|
|
|
|
use OpenCloud\Common\Error\BaseError;
|
|
|
|
use OpenCloud\Common\Error\NotImplementedError;
|
|
|
|
use OpenCloud\Common\Error\UserInputError;
|
2016-02-12 12:45:00 +01:00
|
|
|
|
|
|
|
|
|
|
|
Class errorManagement{
|
|
|
|
|
|
|
|
protected $app;
|
|
|
|
|
|
|
|
|
|
|
|
public function __construct($args){
|
|
|
|
|
|
|
|
$this->app = $args;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
public function BaseErrorHandler($error){
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
public function BadResponseHandler($error){
|
2016-02-12 18:01:18 +01:00
|
|
|
$this->app->setOutput("Error", "Erreur Interne, Merci de contacter un administrateur!");
|
2016-02-12 12:45:00 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
public function NotImplementedHandler($error){
|
2016-02-12 18:01:18 +01:00
|
|
|
$this->app->setOutput("Error", "Erreur Interne, Merci de contacter un administrateur!");
|
2016-02-12 12:45:00 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
public function UserInputHandler($error){
|
|
|
|
|
|
|
|
}
|
2016-03-17 11:34:56 +01:00
|
|
|
|
|
|
|
public function OtherException($error){
|
2016-03-21 10:19:26 +01:00
|
|
|
$this->app->setOutput("Error", $error->getMessage());
|
2016-03-17 11:34:56 +01:00
|
|
|
}
|
2016-02-12 12:45:00 +01:00
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2016-03-09 15:21:46 +01:00
|
|
|
?>
|