@@ -315,7 +315,29 @@ protected function process()
315
315
try {
316
316
// persist the URL rewrite
317
317
if ($ this ->hasChanges ($ urlRewrite )) {
318
- $ this ->urlRewriteId = $ this ->persistUrlRewrite ($ urlRewrite );
318
+ try {
319
+ $ this ->urlRewriteId = $ this ->persistUrlRewrite ($ urlRewrite );
320
+ } catch (\PDOException $ pdoe ) {
321
+ $ message = sprintf ('%s with Urlrewrite Data %s " ' , $ pdoe ->getMessage (), $ urlRewrite );
322
+ if (!$ this ->getSubject ()->isStrictMode ()) {
323
+ $ this ->getSubject ()
324
+ ->getSystemLogger ()
325
+ ->warning ($ this ->getSubject ()->appendExceptionSuffix ($ message ));
326
+ $ this ->mergeStatus (
327
+ array (
328
+ RegistryKeys::NO_STRICT_VALIDATIONS => array (
329
+ basename ($ this ->getFilename ()) => array (
330
+ $ this ->getLineNumber () => array (
331
+ ColumnKeys::URL_KEY => $ message
332
+ )
333
+ )
334
+ )
335
+ )
336
+ );
337
+ } else {
338
+ throw new \PDOException ($ pdoe );
339
+ }
340
+ }
319
341
} else {
320
342
$ this ->urlRewriteId = $ urlRewrite [MemberNames::URL_REWRITE_ID ];
321
343
}
@@ -335,7 +357,29 @@ protected function process()
335
357
336
358
// persist the URL rewrite product category relation
337
359
if ($ this ->hasChanges ($ urlRewriteProductCategory )) {
338
- $ this ->persistUrlRewriteProductCategory ($ urlRewriteProductCategory );
360
+ try {
361
+ $ this ->persistUrlRewriteProductCategory ($ urlRewriteProductCategory );
362
+ } catch (\PDOException $ pdoe ) {
363
+ $ message = sprintf ('%s with Urlrewrite Data %s " ' , $ pdoe ->getMessage (), $ urlRewriteProductCategory );
364
+ if (!$ this ->getSubject ()->isStrictMode ()) {
365
+ $ this ->getSubject ()
366
+ ->getSystemLogger ()
367
+ ->warning ($ this ->getSubject ()->appendExceptionSuffix ($ message ));
368
+ $ this ->mergeStatus (
369
+ array (
370
+ RegistryKeys::NO_STRICT_VALIDATIONS => array (
371
+ basename ($ this ->getFilename ()) => array (
372
+ $ this ->getLineNumber () => array (
373
+ ColumnKeys::URL_KEY => $ message
374
+ )
375
+ )
376
+ )
377
+ )
378
+ );
379
+ } else {
380
+ throw new \PDOException ($ pdoe );
381
+ }
382
+ }
339
383
}
340
384
} catch (\Exception $ e ) {
341
385
if (!$ this ->getSubject ()->isStrictMode ()) {
0 commit comments