Skip to content

Commit 576eae2

Browse files
authored
Sort exceptions alphabetically (#1875)
1 parent db1b53c commit 576eae2

File tree

2 files changed

+50
-46
lines changed

2 files changed

+50
-46
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## NOT RELEASED
44

5+
### Changed
6+
7+
- Sort exception alphabetically.
8+
59
## 2.2.0
610

711
### Added

src/CodeDeployClient.php

Lines changed: 46 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -76,63 +76,63 @@ class CodeDeployClient extends AbstractApi
7676
* '@region'?: string|null,
7777
* }|CreateDeploymentInput $input
7878
*
79-
* @throws ApplicationNameRequiredException
80-
* @throws InvalidApplicationNameException
79+
* @throws AlarmsLimitExceededException
8180
* @throws ApplicationDoesNotExistException
82-
* @throws DeploymentGroupNameRequiredException
83-
* @throws InvalidDeploymentGroupNameException
84-
* @throws DeploymentGroupDoesNotExistException
85-
* @throws RevisionRequiredException
86-
* @throws RevisionDoesNotExistException
87-
* @throws InvalidRevisionException
88-
* @throws InvalidDeploymentConfigNameException
81+
* @throws ApplicationNameRequiredException
8982
* @throws DeploymentConfigDoesNotExistException
90-
* @throws DescriptionTooLongException
83+
* @throws DeploymentGroupDoesNotExistException
84+
* @throws DeploymentGroupNameRequiredException
9185
* @throws DeploymentLimitExceededException
92-
* @throws InvalidTargetInstancesException
86+
* @throws DescriptionTooLongException
9387
* @throws InvalidAlarmConfigException
94-
* @throws AlarmsLimitExceededException
88+
* @throws InvalidApplicationNameException
9589
* @throws InvalidAutoRollbackConfigException
96-
* @throws InvalidLoadBalancerInfoException
97-
* @throws InvalidFileExistsBehaviorException
98-
* @throws InvalidRoleException
9990
* @throws InvalidAutoScalingGroupException
100-
* @throws ThrottlingException
101-
* @throws InvalidUpdateOutdatedInstancesOnlyValueException
102-
* @throws InvalidIgnoreApplicationStopFailuresValueException
91+
* @throws InvalidDeploymentConfigNameException
92+
* @throws InvalidDeploymentGroupNameException
93+
* @throws InvalidFileExistsBehaviorException
10394
* @throws InvalidGitHubAccountTokenException
95+
* @throws InvalidIgnoreApplicationStopFailuresValueException
96+
* @throws InvalidLoadBalancerInfoException
97+
* @throws InvalidRevisionException
98+
* @throws InvalidRoleException
99+
* @throws InvalidTargetInstancesException
104100
* @throws InvalidTrafficRoutingConfigurationException
101+
* @throws InvalidUpdateOutdatedInstancesOnlyValueException
102+
* @throws RevisionDoesNotExistException
103+
* @throws RevisionRequiredException
104+
* @throws ThrottlingException
105105
*/
106106
public function createDeployment($input): CreateDeploymentOutput
107107
{
108108
$input = CreateDeploymentInput::create($input);
109109
$response = $this->getResponse($input->request(), new RequestContext(['operation' => 'CreateDeployment', 'region' => $input->getRegion(), 'exceptionMapping' => [
110-
'ApplicationNameRequiredException' => ApplicationNameRequiredException::class,
111-
'InvalidApplicationNameException' => InvalidApplicationNameException::class,
110+
'AlarmsLimitExceededException' => AlarmsLimitExceededException::class,
112111
'ApplicationDoesNotExistException' => ApplicationDoesNotExistException::class,
113-
'DeploymentGroupNameRequiredException' => DeploymentGroupNameRequiredException::class,
114-
'InvalidDeploymentGroupNameException' => InvalidDeploymentGroupNameException::class,
115-
'DeploymentGroupDoesNotExistException' => DeploymentGroupDoesNotExistException::class,
116-
'RevisionRequiredException' => RevisionRequiredException::class,
117-
'RevisionDoesNotExistException' => RevisionDoesNotExistException::class,
118-
'InvalidRevisionException' => InvalidRevisionException::class,
119-
'InvalidDeploymentConfigNameException' => InvalidDeploymentConfigNameException::class,
112+
'ApplicationNameRequiredException' => ApplicationNameRequiredException::class,
120113
'DeploymentConfigDoesNotExistException' => DeploymentConfigDoesNotExistException::class,
121-
'DescriptionTooLongException' => DescriptionTooLongException::class,
114+
'DeploymentGroupDoesNotExistException' => DeploymentGroupDoesNotExistException::class,
115+
'DeploymentGroupNameRequiredException' => DeploymentGroupNameRequiredException::class,
122116
'DeploymentLimitExceededException' => DeploymentLimitExceededException::class,
123-
'InvalidTargetInstancesException' => InvalidTargetInstancesException::class,
117+
'DescriptionTooLongException' => DescriptionTooLongException::class,
124118
'InvalidAlarmConfigException' => InvalidAlarmConfigException::class,
125-
'AlarmsLimitExceededException' => AlarmsLimitExceededException::class,
119+
'InvalidApplicationNameException' => InvalidApplicationNameException::class,
126120
'InvalidAutoRollbackConfigException' => InvalidAutoRollbackConfigException::class,
127-
'InvalidLoadBalancerInfoException' => InvalidLoadBalancerInfoException::class,
128-
'InvalidFileExistsBehaviorException' => InvalidFileExistsBehaviorException::class,
129-
'InvalidRoleException' => InvalidRoleException::class,
130121
'InvalidAutoScalingGroupException' => InvalidAutoScalingGroupException::class,
131-
'ThrottlingException' => ThrottlingException::class,
132-
'InvalidUpdateOutdatedInstancesOnlyValueException' => InvalidUpdateOutdatedInstancesOnlyValueException::class,
133-
'InvalidIgnoreApplicationStopFailuresValueException' => InvalidIgnoreApplicationStopFailuresValueException::class,
122+
'InvalidDeploymentConfigNameException' => InvalidDeploymentConfigNameException::class,
123+
'InvalidDeploymentGroupNameException' => InvalidDeploymentGroupNameException::class,
124+
'InvalidFileExistsBehaviorException' => InvalidFileExistsBehaviorException::class,
134125
'InvalidGitHubAccountTokenException' => InvalidGitHubAccountTokenException::class,
126+
'InvalidIgnoreApplicationStopFailuresValueException' => InvalidIgnoreApplicationStopFailuresValueException::class,
127+
'InvalidLoadBalancerInfoException' => InvalidLoadBalancerInfoException::class,
128+
'InvalidRevisionException' => InvalidRevisionException::class,
129+
'InvalidRoleException' => InvalidRoleException::class,
130+
'InvalidTargetInstancesException' => InvalidTargetInstancesException::class,
135131
'InvalidTrafficRoutingConfigurationException' => InvalidTrafficRoutingConfigurationException::class,
132+
'InvalidUpdateOutdatedInstancesOnlyValueException' => InvalidUpdateOutdatedInstancesOnlyValueException::class,
133+
'RevisionDoesNotExistException' => RevisionDoesNotExistException::class,
134+
'RevisionRequiredException' => RevisionRequiredException::class,
135+
'ThrottlingException' => ThrottlingException::class,
136136
]]));
137137

138138
return new CreateDeploymentOutput($response);
@@ -153,17 +153,17 @@ public function createDeployment($input): CreateDeploymentOutput
153153
* '@region'?: string|null,
154154
* }|GetDeploymentInput $input
155155
*
156+
* @throws DeploymentDoesNotExistException
156157
* @throws DeploymentIdRequiredException
157158
* @throws InvalidDeploymentIdException
158-
* @throws DeploymentDoesNotExistException
159159
*/
160160
public function getDeployment($input): GetDeploymentOutput
161161
{
162162
$input = GetDeploymentInput::create($input);
163163
$response = $this->getResponse($input->request(), new RequestContext(['operation' => 'GetDeployment', 'region' => $input->getRegion(), 'exceptionMapping' => [
164+
'DeploymentDoesNotExistException' => DeploymentDoesNotExistException::class,
164165
'DeploymentIdRequiredException' => DeploymentIdRequiredException::class,
165166
'InvalidDeploymentIdException' => InvalidDeploymentIdException::class,
166-
'DeploymentDoesNotExistException' => DeploymentDoesNotExistException::class,
167167
]]));
168168

169169
return new GetDeploymentOutput($response);
@@ -190,24 +190,24 @@ public function getDeployment($input): GetDeploymentOutput
190190
* '@region'?: string|null,
191191
* }|PutLifecycleEventHookExecutionStatusInput $input
192192
*
193-
* @throws InvalidLifecycleEventHookExecutionStatusException
194-
* @throws InvalidLifecycleEventHookExecutionIdException
195-
* @throws LifecycleEventAlreadyCompletedException
196-
* @throws DeploymentIdRequiredException
197193
* @throws DeploymentDoesNotExistException
194+
* @throws DeploymentIdRequiredException
198195
* @throws InvalidDeploymentIdException
196+
* @throws InvalidLifecycleEventHookExecutionIdException
197+
* @throws InvalidLifecycleEventHookExecutionStatusException
198+
* @throws LifecycleEventAlreadyCompletedException
199199
* @throws UnsupportedActionForDeploymentTypeException
200200
*/
201201
public function putLifecycleEventHookExecutionStatus($input = []): PutLifecycleEventHookExecutionStatusOutput
202202
{
203203
$input = PutLifecycleEventHookExecutionStatusInput::create($input);
204204
$response = $this->getResponse($input->request(), new RequestContext(['operation' => 'PutLifecycleEventHookExecutionStatus', 'region' => $input->getRegion(), 'exceptionMapping' => [
205-
'InvalidLifecycleEventHookExecutionStatusException' => InvalidLifecycleEventHookExecutionStatusException::class,
206-
'InvalidLifecycleEventHookExecutionIdException' => InvalidLifecycleEventHookExecutionIdException::class,
207-
'LifecycleEventAlreadyCompletedException' => LifecycleEventAlreadyCompletedException::class,
208-
'DeploymentIdRequiredException' => DeploymentIdRequiredException::class,
209205
'DeploymentDoesNotExistException' => DeploymentDoesNotExistException::class,
206+
'DeploymentIdRequiredException' => DeploymentIdRequiredException::class,
210207
'InvalidDeploymentIdException' => InvalidDeploymentIdException::class,
208+
'InvalidLifecycleEventHookExecutionIdException' => InvalidLifecycleEventHookExecutionIdException::class,
209+
'InvalidLifecycleEventHookExecutionStatusException' => InvalidLifecycleEventHookExecutionStatusException::class,
210+
'LifecycleEventAlreadyCompletedException' => LifecycleEventAlreadyCompletedException::class,
211211
'UnsupportedActionForDeploymentTypeException' => UnsupportedActionForDeploymentTypeException::class,
212212
]]));
213213

0 commit comments

Comments
 (0)