Skip to content

Commit 0433398

Browse files
authored
Sort exceptions alphabetically (#1875)
1 parent 318f71a commit 0433398

File tree

2 files changed

+24
-20
lines changed

2 files changed

+24
-20
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
## 1.5.0
610

711
### Added

src/StepFunctionsClient.php

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -59,23 +59,23 @@ class StepFunctionsClient extends AbstractApi
5959
* '@region'?: string|null,
6060
* }|SendTaskFailureInput $input
6161
*
62-
* @throws TaskDoesNotExistException
6362
* @throws InvalidTokenException
64-
* @throws TaskTimedOutException
6563
* @throws KmsAccessDeniedException
6664
* @throws KmsInvalidStateException
6765
* @throws KmsThrottlingException
66+
* @throws TaskDoesNotExistException
67+
* @throws TaskTimedOutException
6868
*/
6969
public function sendTaskFailure($input): SendTaskFailureOutput
7070
{
7171
$input = SendTaskFailureInput::create($input);
7272
$response = $this->getResponse($input->request(), new RequestContext(['operation' => 'SendTaskFailure', 'region' => $input->getRegion(), 'exceptionMapping' => [
73-
'TaskDoesNotExist' => TaskDoesNotExistException::class,
7473
'InvalidToken' => InvalidTokenException::class,
75-
'TaskTimedOut' => TaskTimedOutException::class,
7674
'KmsAccessDeniedException' => KmsAccessDeniedException::class,
7775
'KmsInvalidStateException' => KmsInvalidStateException::class,
7876
'KmsThrottlingException' => KmsThrottlingException::class,
77+
'TaskDoesNotExist' => TaskDoesNotExistException::class,
78+
'TaskTimedOut' => TaskTimedOutException::class,
7979
]]));
8080

8181
return new SendTaskFailureOutput($response);
@@ -106,16 +106,16 @@ public function sendTaskFailure($input): SendTaskFailureOutput
106106
* '@region'?: string|null,
107107
* }|SendTaskHeartbeatInput $input
108108
*
109-
* @throws TaskDoesNotExistException
110109
* @throws InvalidTokenException
110+
* @throws TaskDoesNotExistException
111111
* @throws TaskTimedOutException
112112
*/
113113
public function sendTaskHeartbeat($input): SendTaskHeartbeatOutput
114114
{
115115
$input = SendTaskHeartbeatInput::create($input);
116116
$response = $this->getResponse($input->request(), new RequestContext(['operation' => 'SendTaskHeartbeat', 'region' => $input->getRegion(), 'exceptionMapping' => [
117-
'TaskDoesNotExist' => TaskDoesNotExistException::class,
118117
'InvalidToken' => InvalidTokenException::class,
118+
'TaskDoesNotExist' => TaskDoesNotExistException::class,
119119
'TaskTimedOut' => TaskTimedOutException::class,
120120
]]));
121121

@@ -138,25 +138,25 @@ public function sendTaskHeartbeat($input): SendTaskHeartbeatOutput
138138
* '@region'?: string|null,
139139
* }|SendTaskSuccessInput $input
140140
*
141-
* @throws TaskDoesNotExistException
142141
* @throws InvalidOutputException
143142
* @throws InvalidTokenException
144-
* @throws TaskTimedOutException
145143
* @throws KmsAccessDeniedException
146144
* @throws KmsInvalidStateException
147145
* @throws KmsThrottlingException
146+
* @throws TaskDoesNotExistException
147+
* @throws TaskTimedOutException
148148
*/
149149
public function sendTaskSuccess($input): SendTaskSuccessOutput
150150
{
151151
$input = SendTaskSuccessInput::create($input);
152152
$response = $this->getResponse($input->request(), new RequestContext(['operation' => 'SendTaskSuccess', 'region' => $input->getRegion(), 'exceptionMapping' => [
153-
'TaskDoesNotExist' => TaskDoesNotExistException::class,
154153
'InvalidOutput' => InvalidOutputException::class,
155154
'InvalidToken' => InvalidTokenException::class,
156-
'TaskTimedOut' => TaskTimedOutException::class,
157155
'KmsAccessDeniedException' => KmsAccessDeniedException::class,
158156
'KmsInvalidStateException' => KmsInvalidStateException::class,
159157
'KmsThrottlingException' => KmsThrottlingException::class,
158+
'TaskDoesNotExist' => TaskDoesNotExistException::class,
159+
'TaskTimedOut' => TaskTimedOutException::class,
160160
]]));
161161

162162
return new SendTaskSuccessOutput($response);
@@ -216,33 +216,33 @@ public function sendTaskSuccess($input): SendTaskSuccessOutput
216216
* '@region'?: string|null,
217217
* }|StartExecutionInput $input
218218
*
219-
* @throws ExecutionLimitExceededException
220219
* @throws ExecutionAlreadyExistsException
220+
* @throws ExecutionLimitExceededException
221221
* @throws InvalidArnException
222222
* @throws InvalidExecutionInputException
223223
* @throws InvalidNameException
224-
* @throws StateMachineDoesNotExistException
225-
* @throws StateMachineDeletingException
226-
* @throws ValidationException
227224
* @throws KmsAccessDeniedException
228225
* @throws KmsInvalidStateException
229226
* @throws KmsThrottlingException
227+
* @throws StateMachineDeletingException
228+
* @throws StateMachineDoesNotExistException
229+
* @throws ValidationException
230230
*/
231231
public function startExecution($input): StartExecutionOutput
232232
{
233233
$input = StartExecutionInput::create($input);
234234
$response = $this->getResponse($input->request(), new RequestContext(['operation' => 'StartExecution', 'region' => $input->getRegion(), 'exceptionMapping' => [
235-
'ExecutionLimitExceeded' => ExecutionLimitExceededException::class,
236235
'ExecutionAlreadyExists' => ExecutionAlreadyExistsException::class,
236+
'ExecutionLimitExceeded' => ExecutionLimitExceededException::class,
237237
'InvalidArn' => InvalidArnException::class,
238238
'InvalidExecutionInput' => InvalidExecutionInputException::class,
239239
'InvalidName' => InvalidNameException::class,
240-
'StateMachineDoesNotExist' => StateMachineDoesNotExistException::class,
241-
'StateMachineDeleting' => StateMachineDeletingException::class,
242-
'ValidationException' => ValidationException::class,
243240
'KmsAccessDeniedException' => KmsAccessDeniedException::class,
244241
'KmsInvalidStateException' => KmsInvalidStateException::class,
245242
'KmsThrottlingException' => KmsThrottlingException::class,
243+
'StateMachineDeleting' => StateMachineDeletingException::class,
244+
'StateMachineDoesNotExist' => StateMachineDoesNotExistException::class,
245+
'ValidationException' => ValidationException::class,
246246
]]));
247247

248248
return new StartExecutionOutput($response);
@@ -271,21 +271,21 @@ public function startExecution($input): StartExecutionOutput
271271
*
272272
* @throws ExecutionDoesNotExistException
273273
* @throws InvalidArnException
274-
* @throws ValidationException
275274
* @throws KmsAccessDeniedException
276275
* @throws KmsInvalidStateException
277276
* @throws KmsThrottlingException
277+
* @throws ValidationException
278278
*/
279279
public function stopExecution($input): StopExecutionOutput
280280
{
281281
$input = StopExecutionInput::create($input);
282282
$response = $this->getResponse($input->request(), new RequestContext(['operation' => 'StopExecution', 'region' => $input->getRegion(), 'exceptionMapping' => [
283283
'ExecutionDoesNotExist' => ExecutionDoesNotExistException::class,
284284
'InvalidArn' => InvalidArnException::class,
285-
'ValidationException' => ValidationException::class,
286285
'KmsAccessDeniedException' => KmsAccessDeniedException::class,
287286
'KmsInvalidStateException' => KmsInvalidStateException::class,
288287
'KmsThrottlingException' => KmsThrottlingException::class,
288+
'ValidationException' => ValidationException::class,
289289
]]));
290290

291291
return new StopExecutionOutput($response);

0 commit comments

Comments
 (0)