Ivan - Fix master issues. Improve error handling

This commit is contained in:
ivan 2016-11-24 18:02:18 -03:00
parent 9ec10a356b
commit 2703f82253
3 changed files with 4 additions and 5 deletions

@ -14,12 +14,11 @@ abstract class Controller {
return function () {
try {
$this->validate();
} catch (ValidationException $exception) {
$this->handler();
} catch (\Exception $exception) {
Response::respondError($exception->getMessage());
return;
}
$this->handler();
};
}

@ -3,7 +3,7 @@
class Article extends DataStore {
const TABLE = 'article';
public function getProps() {
public static function getProps() {
return [
'title',
'content',

@ -3,7 +3,7 @@
class Topic extends DataStore {
const TABLE = 'topic';
public function getProps() {
public static function getProps() {
return [
'name',
'icon',