@@ -29,8 +29,8 @@ |
||
| 29 | 29 | |
| 30 | 30 | protected function setUp() |
| 31 | 31 | { |
| 32 | - $this->propItem = new \Aimeos\MShop\Common\Item\Property\Standard( 'c.', ['.languageid' => 'de', 'c.type' => 'test', 'c.value' => 'value']); |
|
| 33 | - $this->propItem2 = new \Aimeos\MShop\Common\Item\Property\Standard( 'c.', ['.languageid' => 'de', 'c.languageid' => 'en', 'c.type' => 'test2']); |
|
| 32 | + $this->propItem = new \Aimeos\MShop\Common\Item\Property\Standard( 'c.', ['.languageid' => 'de', 'c.type' => 'test', 'c.value' => 'value'] ); |
|
| 33 | + $this->propItem2 = new \Aimeos\MShop\Common\Item\Property\Standard( 'c.', ['.languageid' => 'de', 'c.languageid' => 'en', 'c.type' => 'test2'] ); |
|
| 34 | 34 | |
| 35 | 35 | $this->object = new TraitsClass(); |
| 36 | 36 | $this->object->addPropertyItem( $this->propItem ); |
@@ -86,9 +86,12 @@ |
||
| 86 | 86 | throw new \Aimeos\MW\DB\Exception( sprintf( $msg, count( $this->binds ), implode( '?', $this->parts ) ) ); |
| 87 | 87 | } |
| 88 | 88 | |
| 89 | - try { |
|
| 89 | + try |
|
| 90 | + { |
|
| 90 | 91 | $result = $this->exec(); |
| 91 | - } catch( \PDOException $e ) { |
|
| 92 | + } |
|
| 93 | + catch( \PDOException $e ) |
|
| 94 | + { |
|
| 92 | 95 | throw new \Aimeos\MW\DB\Exception( $e->getMessage() . ': ' . $this->sql, $e->getCode() ); |
| 93 | 96 | } |
| 94 | 97 | |
@@ -59,9 +59,12 @@ |
||
| 59 | 59 | */ |
| 60 | 60 | public function execute() |
| 61 | 61 | { |
| 62 | - try { |
|
| 62 | + try |
|
| 63 | + { |
|
| 63 | 64 | $stmt = $this->exec(); |
| 64 | - } catch( \PDOException $e ) { |
|
| 65 | + } |
|
| 66 | + catch( \PDOException $e ) |
|
| 67 | + { |
|
| 65 | 68 | throw new \Aimeos\MW\DB\Exception( $e->getMessage() . ': ' . $this->sql, $e->getCode(), $e->errorInfo ); |
| 66 | 69 | } |
| 67 | 70 | |
@@ -85,9 +85,12 @@ |
||
| 85 | 85 | throw new \Aimeos\MW\DB\Exception( sprintf( $msg, count( $this->binds ), implode( '?', $this->parts ) ) ); |
| 86 | 86 | } |
| 87 | 87 | |
| 88 | - try { |
|
| 88 | + try |
|
| 89 | + { |
|
| 89 | 90 | $result = $this->exec(); |
| 90 | - } catch( \PDOException $e ) { |
|
| 91 | + } |
|
| 92 | + catch( \PDOException $e ) |
|
| 93 | + { |
|
| 91 | 94 | throw new \Aimeos\MW\DB\Exception( $e->getMessage() . ': ' . $this->sql, $e->getCode() ); |
| 92 | 95 | } |
| 93 | 96 | |
@@ -58,9 +58,12 @@ |
||
| 58 | 58 | */ |
| 59 | 59 | public function execute() |
| 60 | 60 | { |
| 61 | - try { |
|
| 61 | + try |
|
| 62 | + { |
|
| 62 | 63 | $stmt = $this->exec(); |
| 63 | - } catch( \PDOException $e ) { |
|
| 64 | + } |
|
| 65 | + catch( \PDOException $e ) |
|
| 66 | + { |
|
| 64 | 67 | throw new \Aimeos\MW\DB\Exception( $e->getMessage() . ': ' . $this->sql, $e->getCode() ); |
| 65 | 68 | } |
| 66 | 69 | |