5
5
use SendCloud \SendCloud \Logger \SendCloudLogger ;
6
6
use Magento \Authorization \Model \RoleFactory ;
7
7
use Magento \Authorization \Model \RulesFactory ;
8
- use Magento \Setup \Exception ;
9
8
use Magento \User \Model \UserFactory ;
10
9
use Magento \Authorization \Model \Acl \Role \Group as RoleGroup ;
11
10
use Magento \Authorization \Model \UserContextInterface ;
@@ -74,7 +73,7 @@ public function __construct(
74
73
* @param $password
75
74
* @param int|null $store
76
75
* @return array|false
77
- * @throws Exception
76
+ * @throws \ Exception
78
77
* @throws \Magento\Framework\Exception\NoSuchEntityException
79
78
*/
80
79
public function getApiUser ($ password , $ store )
@@ -95,7 +94,7 @@ public function getApiUser($password, $store)
95
94
$ apiUser ->save ();
96
95
} catch (\Exception $ ex ) {
97
96
$ this ->logger ->debug ($ ex ->getMessage ());
98
- throw new Exception ($ ex ->getMessage ());
97
+ throw new \ Exception ($ ex ->getMessage ());
99
98
}
100
99
101
100
$ apiUserArray = [
@@ -161,7 +160,7 @@ public function createApiUser($password, $store)
161
160
* Create Api Role
162
161
*
163
162
* @return \Magento\Authorization\Model\Role
164
- * @throws Exception
163
+ * @throws \ Exception
165
164
*/
166
165
private function generateApiRole ()
167
166
{
@@ -186,7 +185,7 @@ private function generateApiRole()
186
185
$ role ->save ();
187
186
} catch (\Exception $ ex ) {
188
187
$ this ->logger ->debug ($ ex ->getMessage ());
189
- throw new Exception ($ ex ->getMessage ());
188
+ throw new \ Exception ($ ex ->getMessage ());
190
189
}
191
190
192
191
$ this ->rulesFactory ->create ()
0 commit comments