@@ -34,7 +34,6 @@ public function __construct(
34
34
/**
35
35
* @param string[]|ProductCollection $products
36
36
* @return string[] Array of product IDs that were reindexed by this repair operation
37
- * @throws \Zend_Db_Select_Exception
38
37
*/
39
38
public function refreshPriceIndex (array |ProductCollection $ products ): array
40
39
{
@@ -55,7 +54,6 @@ public function refreshPriceIndex(array|ProductCollection $products): array
55
54
* Analyzes a product collection and determines which (if any) records should have their prices reindexed
56
55
* @param string[]|ProductCollection $products - either an explicit list of product ids or a product collection
57
56
* @return string[] IDs of products that require price reindexing (will be empty if no indexing is required)
58
- * @throws \Zend_Db_Select_Exception
59
57
*/
60
58
protected function getProductIdsToReindex (array |ProductCollection $ products ): array
61
59
{
@@ -115,15 +113,19 @@ protected function filterProductIdsNotYetProcessed(array $productIds): array {
115
113
116
114
/**
117
115
* Expand the query for product ids from the collection regardless of price index status
118
- * @throws \Zend_Db_Select_Exception
119
116
* @return string[] An array of indices to be evaluated - array will be empty if no price index join found
120
117
*/
121
118
protected function getProductIdsFromCollection (ProductCollection $ collection ): array
122
119
{
123
120
124
121
$ select = clone $ collection ->getSelect ();
125
- // TODO: Log this exception - pending DiagnosticsLogger
126
- $ joins = $ select ->getPart (Zend_Db_Select::FROM );
122
+ try {
123
+ $ joins = $ select ->getPart (Zend_Db_Select::FROM );
124
+ } catch (\Zend_Db_Select_Exception $ e ) {
125
+ $ this ->logger ->error ("Unable to build query for missing product prices: " . $ e ->getMessage ());
126
+ return [];
127
+ }
128
+
127
129
$ priceIndexJoin = $ this ->getPriceIndexJoinAlias ($ joins );
128
130
129
131
if (!$ priceIndexJoin ) {
0 commit comments