@@ -129,8 +129,7 @@ |
||
| 129 | 129 | $remaining = $this->getObject()->process( $product, $data ); |
| 130 | 130 | |
| 131 | 131 | $manager->commit(); |
| 132 | - } |
|
| 133 | - catch( \Exception $e ) |
|
| 132 | + } catch( \Exception $e ) |
|
| 134 | 133 | { |
| 135 | 134 | $manager->rollback(); |
| 136 | 135 | throw $e; |
@@ -173,8 +173,7 @@ |
||
| 173 | 173 | $statusItem->setValue( $status ); |
| 174 | 174 | |
| 175 | 175 | $orderStatusManager->saveItem( $statusItem ); |
| 176 | - } |
|
| 177 | - catch( \Exception $e ) |
|
| 176 | + } catch( \Exception $e ) |
|
| 178 | 177 | { |
| 179 | 178 | $str = 'Error while trying to send delivery e-mail for order ID "%1$s" and status "%2$s": %3$s'; |
| 180 | 179 | $msg = sprintf( $str, $item->getId(), $item->getDeliveryStatus(), $e->getMessage() ); |
@@ -66,8 +66,7 @@ |
||
| 66 | 66 | try |
| 67 | 67 | { |
| 68 | 68 | $serviceManager->getProvider( $serviceItem )->updateAsync(); |
| 69 | - } |
|
| 70 | - catch( \Exception $e ) |
|
| 69 | + } catch( \Exception $e ) |
|
| 71 | 70 | { |
| 72 | 71 | $msg = 'Executing updateAsyc() of "%1$s" failed: %2$s'; |
| 73 | 72 | $context->getLogger()->log( sprintf( $msg, $serviceItem->getProvider(), $e->getMessage() ) ); |
@@ -120,8 +120,7 @@ discard block |
||
| 120 | 120 | { |
| 121 | 121 | $capdate = date( 'Y-m-d 00:00:00', time() - 86400 * $capDays ); |
| 122 | 122 | $expr[] = $orderSearch->compare( '<=', 'order.datepayment', $capdate ); |
| 123 | - } |
|
| 124 | - else |
|
| 123 | + } else |
|
| 125 | 124 | { |
| 126 | 125 | $expr[] = $orderSearch->compare( '==', 'order.statusdelivery', $status ); |
| 127 | 126 | } |
@@ -144,8 +143,7 @@ discard block |
||
| 144 | 143 | try |
| 145 | 144 | { |
| 146 | 145 | $serviceProvider->capture( $orderItem ); |
| 147 | - } |
|
| 148 | - catch( \Exception $e ) |
|
| 146 | + } catch( \Exception $e ) |
|
| 149 | 147 | { |
| 150 | 148 | $str = 'Error while capturing payment for order with ID "%1$s": %2$s'; |
| 151 | 149 | $context->getLogger()->log( sprintf( $str, $orderItem->getId(), $e->getMessage() ) ); |
@@ -157,8 +155,7 @@ discard block |
||
| 157 | 155 | $orderSearch->setSlice( $orderStart ); |
| 158 | 156 | } |
| 159 | 157 | while( $orderCount >= $orderSearch->getSliceSize() ); |
| 160 | - } |
|
| 161 | - catch( \Exception $e ) |
|
| 158 | + } catch( \Exception $e ) |
|
| 162 | 159 | { |
| 163 | 160 | $str = 'Error while capturing payments for service with ID "%1$s": %2$s'; |
| 164 | 161 | $context->getLogger()->log( sprintf( $str, $serviceItem->getId(), $e->getMessage() ) ); |
@@ -112,8 +112,7 @@ discard block |
||
| 112 | 112 | { |
| 113 | 113 | $serviceProvider->process( $orderItem ); |
| 114 | 114 | $orderManager->saveItem( $orderItem ); |
| 115 | - } |
|
| 116 | - catch( \Exception $e ) |
|
| 115 | + } catch( \Exception $e ) |
|
| 117 | 116 | { |
| 118 | 117 | $str = 'Error while processing order with ID "%1$s": %2$s'; |
| 119 | 118 | $context->getLogger()->log( sprintf( $str, $orderItem->getId(), $e->getMessage() ) ); |
@@ -125,8 +124,7 @@ discard block |
||
| 125 | 124 | $orderSearch->setSlice( $orderStart ); |
| 126 | 125 | } |
| 127 | 126 | while( $orderCount >= $orderSearch->getSliceSize() ); |
| 128 | - } |
|
| 129 | - catch( \Exception $e ) |
|
| 127 | + } catch( \Exception $e ) |
|
| 130 | 128 | { |
| 131 | 129 | $str = 'Error while processing service with ID "%1$s": %2$s'; |
| 132 | 130 | $context->getLogger()->log( sprintf( $str, $serviceItem->getId(), $e->getMessage() ) ); |
@@ -136,8 +136,7 @@ |
||
| 136 | 136 | $subList = self::createControllers( $it, $context, $aimeos, $pref ); |
| 137 | 137 | |
| 138 | 138 | $list = array_merge( $list, $subList ); |
| 139 | - } |
|
| 140 | - else if( $prefix !== '' && $entry->getType() === 'file' |
|
| 139 | + } else if( $prefix !== '' && $entry->getType() === 'file' |
|
| 141 | 140 | && ( $name = $entry->getBaseName( '.php' ) ) === 'Factory' ) |
| 142 | 141 | { |
| 143 | 142 | $list[$prefix] = self::createController( $context, $aimeos, $prefix ); |
@@ -351,8 +351,7 @@ discard block |
||
| 351 | 351 | } |
| 352 | 352 | |
| 353 | 353 | $container->close(); |
| 354 | - } |
|
| 355 | - catch( \Exception $e ) |
|
| 354 | + } catch( \Exception $e ) |
|
| 356 | 355 | { |
| 357 | 356 | $logger->log( 'Product import error: ' . $e->getMessage() ); |
| 358 | 357 | $logger->log( $e->getTraceAsString() ); |
@@ -537,8 +536,7 @@ discard block |
||
| 537 | 536 | $remaining = $processor->process( $product, $list ); |
| 538 | 537 | |
| 539 | 538 | $manager->commit(); |
| 540 | - } |
|
| 541 | - catch( \Exception $e ) |
|
| 539 | + } catch( \Exception $e ) |
|
| 542 | 540 | { |
| 543 | 541 | $manager->rollback(); |
| 544 | 542 | |
@@ -151,8 +151,7 @@ discard block |
||
| 151 | 151 | $this->sendMail( $context, $customers[$custId]->getPaymentAddress(), $custProducts ); |
| 152 | 152 | $listIds += array_keys( $custProducts ); |
| 153 | 153 | } |
| 154 | - } |
|
| 155 | - catch( \Exception $e ) |
|
| 154 | + } catch( \Exception $e ) |
|
| 156 | 155 | { |
| 157 | 156 | $str = 'Error while trying to send product notification e-mail for customer ID "%1$s": %2$s'; |
| 158 | 157 | $msg = sprintf( $str, $custId, $e->getMessage() ); |
@@ -241,8 +240,7 @@ discard block |
||
| 241 | 240 | $result[$id]['price'] = $price; |
| 242 | 241 | } |
| 243 | 242 | } |
| 244 | - } |
|
| 245 | - catch( \Exception $e ) { ; } // no price available |
|
| 243 | + } catch( \Exception $e ) { ; } // no price available |
|
| 246 | 244 | } |
| 247 | 245 | |
| 248 | 246 | return $result; |
@@ -65,8 +65,7 @@ |
||
| 65 | 65 | $item->fromArray( $list ); |
| 66 | 66 | |
| 67 | 67 | $this->sendEmail( $context, $item ); |
| 68 | - } |
|
| 69 | - else |
|
| 68 | + } else |
|
| 70 | 69 | { |
| 71 | 70 | $context->getLogger()->log( sprintf( 'Invalid JSON encode message: %1$s', $msg->getBody() ) ); |
| 72 | 71 | } |