Added error handler

This commit is contained in:
2017-09-07 16:11:54 +07:00
parent 796148a532
commit 23622bc5a8
14 changed files with 204 additions and 56 deletions

View File

@@ -55,7 +55,7 @@ class Access extends \Core\Model
}
return false;
} catch (PDOException $e) {
echo $e->getMessage();
throw new \Exception($e->getMessage(), 444);
}
}
@@ -97,9 +97,8 @@ class Access extends \Core\Model
}
}
\Core\Session::flash('info', 'Invalid username/password');
return false;
} catch (PDOException $e) {
echo $e->getMessage();
throw new \Exception($e->getMessage(), 444);
}
}

View File

@@ -80,9 +80,8 @@ class Post extends \Core\Model
return $result;
}
}
return false;
} catch (PDOException $e) {
echo $e->getMessage();
throw new \Exception($e->getMessage, 444);
}
}
@@ -102,7 +101,7 @@ class Post extends \Core\Model
}
}
} catch (PDOException $e) {
echo $e->getMessage();
throw new \Exception($e->getMessage(), 444);
}
}
@@ -122,7 +121,7 @@ class Post extends \Core\Model
}
}
} catch (PDOException $e) {
echo $e->getMessage();
throw new \Exception($e->getMessage(), 444);
}
}
}