소스 검색

Add previously thrown exception to encapsulating one

Michel Weimerskirch 13 년 전
부모
커밋
ce1099e477
1개의 변경된 파일4개의 추가작업 그리고 4개의 파일을 삭제
  1. 4 4
      Model/ORM/ModelManager.php

+ 4 - 4
Model/ORM/ModelManager.php

@@ -96,7 +96,7 @@ class ModelManager implements ModelManagerInterface
             $this->entityManager->persist($object);
             $this->entityManager->flush();
         } catch ( \PDOException $e ) {
-            throw new ModelManagerException();
+            throw new ModelManagerException('', 0, $e);
         }
     }
 
@@ -106,7 +106,7 @@ class ModelManager implements ModelManagerInterface
             $this->entityManager->persist($object);
             $this->entityManager->flush();
         } catch ( \PDOException $e ) {
-            throw new ModelManagerException();
+            throw new ModelManagerException('', 0, $e);
         }
     }
 
@@ -116,7 +116,7 @@ class ModelManager implements ModelManagerInterface
             $this->entityManager->remove($object);
             $this->entityManager->flush();
         } catch ( \PDOException $e ) {
-            throw new ModelManagerException();
+            throw new ModelManagerException('', 0, $e);
         }
     }
 
@@ -311,7 +311,7 @@ class ModelManager implements ModelManagerInterface
             $this->entityManager->flush();
             $this->entityManager->clear();
         } catch ( \PDOException $e ) {
-            throw new ModelManagerException();
+            throw new ModelManagerException('', 0, $e);
         }
     }