File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
lib/internal/Magento/Framework/EntityManager/Operation Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change 14
14
use Magento \Framework \EntityManager \TypeResolver ;
15
15
use Magento \Framework \App \ResourceConnection ;
16
16
use Magento \Framework \Exception \AlreadyExistsException ;
17
+ use Magento \Framework \Phrase ;
17
18
18
19
/**
19
20
* Class Create
@@ -118,7 +119,7 @@ public function execute($entity, $arguments = [])
118
119
$ connection ->commit ();
119
120
} catch (DuplicateException $ e ) {
120
121
$ connection ->rollBack ();
121
- throw new AlreadyExistsException (__ ('Unique constraint violation found ' ), $ e );
122
+ throw new AlreadyExistsException (new Phrase ('Unique constraint violation found ' ), $ e );
122
123
} catch (\Exception $ e ) {
123
124
$ connection ->rollBack ();
124
125
throw $ e ;
Original file line number Diff line number Diff line change 14
14
use Magento \Framework \EntityManager \TypeResolver ;
15
15
use Magento \Framework \App \ResourceConnection ;
16
16
use Magento \Framework \Exception \AlreadyExistsException ;
17
+ use Magento \Framework \Phrase ;
17
18
18
19
/**
19
20
* Class Update
@@ -117,7 +118,7 @@ public function execute($entity, $arguments = [])
117
118
$ connection ->commit ();
118
119
} catch (DuplicateException $ e ) {
119
120
$ connection ->rollBack ();
120
- throw new AlreadyExistsException (__ ('Unique constraint violation found ' ), $ e );
121
+ throw new AlreadyExistsException (new Phrase ('Unique constraint violation found ' ), $ e );
121
122
} catch (\Exception $ e ) {
122
123
$ connection ->rollBack ();
123
124
throw $ e ;
You can’t perform that action at this time.
0 commit comments