Added error handler
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user