From 8d29564d18a527adcf9bdcb5b5d3c37c5433a0ca Mon Sep 17 00:00:00 2001 From: Alexey Skobkin Date: Wed, 23 Mar 2016 22:37:19 +0300 Subject: [PATCH] New exceptions for factories. --- .../Blogs/InvalidPostDataException.php | 30 +++++++++++++++++++ .../Factory/InvalidUserDataException.php | 30 +++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 src/Skobkin/Bundle/PointToolsBundle/Service/Exceptions/Factory/Blogs/InvalidPostDataException.php create mode 100644 src/Skobkin/Bundle/PointToolsBundle/Service/Exceptions/Factory/InvalidUserDataException.php diff --git a/src/Skobkin/Bundle/PointToolsBundle/Service/Exceptions/Factory/Blogs/InvalidPostDataException.php b/src/Skobkin/Bundle/PointToolsBundle/Service/Exceptions/Factory/Blogs/InvalidPostDataException.php new file mode 100644 index 0000000..303184c --- /dev/null +++ b/src/Skobkin/Bundle/PointToolsBundle/Service/Exceptions/Factory/Blogs/InvalidPostDataException.php @@ -0,0 +1,30 @@ +post = $post; + + parent::__construct($message, $code, $previous); + } + + /** + * @return Post + */ + public function getPost() + { + return $this->post; + } +} \ No newline at end of file diff --git a/src/Skobkin/Bundle/PointToolsBundle/Service/Exceptions/Factory/InvalidUserDataException.php b/src/Skobkin/Bundle/PointToolsBundle/Service/Exceptions/Factory/InvalidUserDataException.php new file mode 100644 index 0000000..9f86ee4 --- /dev/null +++ b/src/Skobkin/Bundle/PointToolsBundle/Service/Exceptions/Factory/InvalidUserDataException.php @@ -0,0 +1,30 @@ +user = $user; + + parent::__construct($message, $code, $previous); + } + + /** + * @return User + */ + public function getUser() + { + return $this->user; + } +} \ No newline at end of file